/* ============================================================
   ESO — European Software Office SRL
   Faithful reproduction of the eso.be design.
   Colours pulled directly from the live site's CSS variables:
     header        #1b262c
     menu text     #e6e6e6
     primary fg    #3d3d3d
     body bg       #ffffff
     soft bg       #f9f9f9
   ============================================================ */

:root {
    --color-header-bg: #1b262c;
    --color-menu-text: #e6e6e6;
    --color-primary:   #3d3d3d;
    --color-body-bg:   #ffffff;
    --color-soft-bg:   #f9f9f9;
    --color-text:      #000000;
    --color-divider:   #d0d0d0;
    --color-accent:    #c9a961;          /* gold star in the logo */
    --header-height:   60px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                 Helvetica, Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-body-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

/* ─── Layout ─────────────────────────────────────────────── */

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Clamp any accidental horizontal overflow without affecting fixed-position
       elements (putting overflow-x: hidden on html/body breaks iOS Safari fixed nav) */
    overflow-x: hidden;
}

main {
    flex: 1;
    /* Push content below the fixed header */
    padding-top: var(--header-height);
}

/* ─── Header ─────────────────────────────────────────────── */

.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: var(--color-header-bg);
    color: var(--color-menu-text);
    height: var(--header-height);
    display: flex;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.header-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-menu-text);
    font-weight: 700;
}

.brand-logo {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.brand-name {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.nav-links a {
    display: inline-block;
    padding: 8px 18px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-menu-text);
    border-radius: 22px;
    border: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.nav-links a.active,
.nav-links a:hover {
    border-color: var(--color-menu-text);
}

/* Hamburger (hidden on desktop) */
.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-menu-text);
}

@media (max-width: 800px) {
    .brand-name { display: none; }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-header-bg);
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
        gap: 4px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    .nav-links.open {
        max-height: 360px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .nav-links a {
        text-align: center;
    }
}

/* ─── Hero ───────────────────────────────────────────────── */
/* Compact banner: text left, looping logo animation right (stacked on small screens). The background is the
   video's own near-black (#08080a), so the 16:9 video blends into the band at any width. */

.hero {
    background: #08080a;
    color: #ffffff;
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: center;
    gap: 32px;
}

.hero-text {
    text-align: left;
}

.hero-text h1 {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
}

/* FocusOnNavigate focuses the h1 for screen readers; no visible box around the title. */
.hero-text h1:focus { outline: none; }

.hero-divider {
    display: block;
    width: 80px;
    height: 2px;
    margin: 16px 0;
    /* the gold of the logo animation */
    background: linear-gradient(90deg, #e2463c, #e8b04b);
}

.hero-tagline {
    margin: 0 0 12px;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    color: #f0f0f0;
    line-height: 1.4;
}

.hero-motto {
    margin: 0 0 12px;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--color-accent);   /* gold of the logo's star */
}

.hero-intro {
    margin: 0;
    font-size: 0.95rem;
    color: #b8b8bc;
    line-height: 1.6;
}

.hero-media {
    /* Caps the banner height: at most 360 px of video (640 px wide). */
    position: relative;
    max-width: 640px;
    justify-self: start;
    width: 100%;
}

/* Speaker button over the film's bottom-right corner (site.js toggles the sound). */
.hero-sound {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(201, 169, 97, 0.7);
    border-radius: 50%;
    background: rgba(8, 8, 10, 0.6);
    color: var(--color-accent);
    font-size: 1.05rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.2s;
}

.hero-sound:hover { background: rgba(8, 8, 10, 0.85); }
.hero-sound:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.hero-video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    background: #08080a;
}

@media (max-width: 800px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px 20px 24px;
    }

    .hero-media {
        justify-self: center;
    }

    .hero-text { text-align: center; }
    .hero-divider { margin: 14px auto; }
}

/* ─── Generic section heading ────────────────────────────── */

.section-heading {
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 700;
    margin: 0 0 12px 0;
    letter-spacing: 0.02em;
    color: var(--color-text);
}

.section-heading.centered { text-align: center; }

.section-divider {
    display: block;
    width: 60px;
    height: 2px;
    background: var(--color-text);
    margin: 0 0 36px 0;
}

.section-divider.centered {
    margin-left: auto;
    margin-right: auto;
}

/* ─── About ──────────────────────────────────────────────── */

.about {
    background: var(--color-body-bg);
    padding: 80px 24px;
}

.about-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-text p {
    margin: 0 0 16px 0;
    font-size: 1rem;
}

.about-image img {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

@media (max-width: 800px) {
    .about-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    /* Show image first on mobile — more visual impact */
    .about-image { order: -1; }
}

@media (max-width: 600px) {
    .about { padding: 48px 20px; }
}

/* ─── Services ───────────────────────────────────────────── */

.services {
    background: var(--color-body-bg);
    padding: 80px 24px;
}

.services-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px 32px;
    margin-top: 24px;
}

/* The 4th tile (Integrator) appears centered on its own row,
   exactly like the original. */
.services-grid > :nth-child(4) {
    grid-column: 2 / 3;
}

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .services-grid > :nth-child(4) {
        grid-column: auto;
    }
}

@media (max-width: 560px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .services-grid > :nth-child(4) {
        grid-column: auto;
    }
}

@media (max-width: 600px) {
    .services { padding: 48px 20px; }
}

.service-tile {
    text-align: center;
}

.service-image {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    background: #eee;
}

/* Slightly larger circle on mobile for easier viewing */
@media (max-width: 560px) {
    .service-image {
        width: 120px;
        height: 120px;
    }
}

.service-tile h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.service-tile p {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    line-height: 1.55;
}

/* ─── Apps ───────────────────────────────────────────────── */

.apps {
    background: var(--color-soft-bg);
    padding: 80px 24px;
}

.apps-inner { max-width: 1200px; margin: 0 auto; }

.apps-lead { text-align: center; max-width: 640px; margin: 0 auto 40px; font-size: 1rem; }

.app-strip {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 32px;
}
.app-strip a { display: flex; flex-direction: column; align-items: center; gap: 10px; font-weight: 600; font-size: 0.95rem; }
.app-strip img, .app-icons img, .app-head img { border-radius: 22%; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12); }
.app-strip a:hover img, .app-icons a:hover img { transform: translateY(-2px); }
@media (prefers-reduced-motion: no-preference) {
    .app-strip img, .app-icons img { transition: transform 0.15s ease; }
}
.apps-more { text-align: center; margin: 40px 0 0; font-weight: 600; }
.apps-more a { text-decoration: underline; }

.app-store-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}
.app-store-link:hover { background: var(--color-primary); }

/* App page: QR code to the App Store, next to the header; only useful on a computer screen. */
.app-qr { margin: 0 0 0 auto; text-align: center; }
.app-head .app-qr img { box-shadow: none; display: block; margin: 0 auto 6px; background: #fff; padding: 6px; border-radius: 8px; border: 1px solid var(--color-divider); }
.app-qr figcaption { font-size: 0.75rem; color: #555; line-height: 1.3; }
@media (max-width: 720px) { .app-qr { display: none; } }

.app-soon {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--color-divider);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #555;
}

@media (max-width: 600px)  { .apps { padding: 48px 20px; } .app-strip { gap: 20px; } }

/* /apps: AutomateIt promotion, then the app icons. */
.promo {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 32px;
    align-items: center;
    background: var(--color-header-bg);
    color: #f0f0f0;
    border-radius: 16px;
    padding: 32px;
    margin: 8px 0 24px;
}
.promo h2 { color: #fff; margin: 0 0 12px; font-size: 1.8rem; }
.promo-kicker { color: var(--color-accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; margin: 0 0 6px; }
.promo-links { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.promo-links a { color: #fff; }
.doc .promo-links .promo-primary {
    background: var(--color-accent);
    color: #1b1b1b;
    padding: 9px 16px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
}
.promo-image img { width: 100%; height: auto; border-radius: 10px; display: block; }

.app-icons { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.doc .app-icons a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 20px 12px;
    border-radius: 12px;
    background: var(--color-soft-bg);
    text-decoration: none;
    height: 100%;
}
.app-icons img { margin-bottom: 8px; }
.app-icons span { font-size: 0.9rem; color: #444; }
.app-icons .app-icons-status { font-size: 0.8rem; color: #777; margin-top: 4px; }

@media (max-width: 800px) {
    .promo { grid-template-columns: 1fr; padding: 24px; }
    .app-icons { grid-template-columns: repeat(2, 1fr); }
}

/* An app's page (/apps/<slug>). */
.doc-back { margin: 0 0 24px; }
.app-head { display: flex; gap: 24px; align-items: center; margin-bottom: 24px; }
.app-head h1 { margin: 0; font-size: 2.2rem; }
.app-head h1:focus { outline: none; }
.app-head-subtitle { margin: 4px 0; font-size: 1.15rem; font-weight: 600; }
.app-head-platforms { margin: 0 0 12px; color: #666; font-size: 0.9rem; }
.doc-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.doc .doc-toc a { text-decoration: none; padding: 4px 12px; border: 1px solid var(--color-divider); border-radius: 999px; font-size: 0.85rem; }
.faq dt { font-weight: 700; margin-top: 18px; }
.faq dd { margin: 6px 0 0; }
@media (max-width: 560px) {
    .app-head { flex-direction: column; align-items: flex-start; }
}

/* ─── Contact ────────────────────────────────────────────── */

.contact {
    background: var(--color-soft-bg);
    padding: 80px 24px;
}

@media (max-width: 600px) {
    .contact { padding: 48px 20px; }
}

.contact-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr 1.4fr;
    gap: 32px;
    margin-top: 24px;
    align-items: start;
}

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

.address {
    font-size: 1rem;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.contact-socials {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.contact-socials a {
    color: var(--color-text);
    font-size: 1.4rem;
    transition: opacity 0.15s;
}

.contact-socials a:hover { opacity: 0.6; }

.contact-form-wrap {
    max-width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.form-field { margin-bottom: 12px; }

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d0d0d0;
    background: #fff;
    border-radius: 0;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-text);
    transition: border-color 0.15s;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-error {
    color: #b00020;
    margin: 6px 0 12px 0;
    font-size: 0.9rem;
    list-style: none;
    padding: 0;
}

.btn-primary {
    display: block;
    width: 100%;
    padding: 14px;
    background: #2c2c2c;
    color: #fff;
    border: 0;
    border-radius: 0;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-primary:hover { background: #000; }
.btn-primary[disabled] { opacity: 0.6; cursor: wait; }

.thank-you {
    padding: 24px;
    background: #fff;
    border: 1px solid #d0d0d0;
    text-align: center;
}

.thank-you h4 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.contact-map {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #eee;
    overflow: hidden;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 1000px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
    .contact-map { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .form-row { grid-template-columns: 1fr; }
}

/* On mobile the map doesn't need to be as tall */
@media (max-width: 600px) {
    .contact-map { aspect-ratio: 16 / 9; }
    /* Minimum touch target height for form fields */
    .form-control { min-height: 44px; }
}

/* ─── Footer ─────────────────────────────────────────────── */

.site-footer {
    background: var(--color-soft-bg);
    border-top: 1px solid #e8e8e8;
    padding: 32px 24px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: var(--color-text);
}

.social-row {
    list-style: none;
    margin: 0 0 18px 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.social-row a {
    display: inline-flex;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s;
}

.social-row a:hover { opacity: 0.75; }

.footer-nav {
    list-style: none;
    margin: 0 0 16px 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 22px;
    font-size: 0.9rem;
    font-weight: 700;
}

.copyright {
    font-size: 0.85rem;
    color: #555;
}

.footer-brand { font-weight: 600; }

/* ─── Validation tweaks ──────────────────────────────────── */
.validation-message { color: #b00020; font-size: 0.85rem; }

/* ─── App privacy policies (/privacy, /<app>/privacy) ────── */

.policy {
    background: var(--color-body-bg);
    padding: 80px 24px;
}

.policy-inner {
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.65;
}

.policy-subtitle {
    margin: -20px 0 16px 0;
    color: var(--color-primary);
}

.policy-lang { margin-bottom: 40px; font-size: 0.95rem; }

.policy-lang ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}

.policy-inner a { color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; }
.policy-inner a:hover { color: var(--color-accent); }

/* FocusOnNavigate focuses the h1 for screen readers; no visible box around the title. */
.policy h1:focus { outline: none; }

.policy-section { margin-bottom: 48px; scroll-margin-top: calc(var(--header-height) + 16px); }

.policy-section h2 {
    font-size: 1.5rem;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-divider);
}

.policy-date { color: var(--color-primary); font-size: 0.9rem; }

.policy-apps { padding-left: 1.2rem; margin: 0 0 32px 0; font-size: 1.1rem; }
.policy-apps li { margin-bottom: 8px; }

@media (max-width: 600px) {
    .policy { padding: 48px 16px; }
}

/* ─── Status pages (contact confirmation, page not found) ── */
/* Plain classes, not style= attributes: the CSP has no 'unsafe-inline' for styles. */

.status-page { max-width: 600px; margin: 6rem auto; padding: 0 1.5rem; text-align: center; }
.status-page-ok { color: #c0392b; }
.status-page-home { display: inline-block; margin-top: 2rem; }

.not-found { padding: 4rem 1rem; text-align: center; }

/* ─── AutomateIt pages (/automateit, /automateit/architecture, /automateit/clean-architecture) ── */

.doc { background: var(--color-body-bg); padding: 48px 24px 80px; }
.doc-inner { max-width: 960px; margin: 0 auto; }
.doc h1:focus { outline: none; }   /* FocusOnNavigate focuses the h1 for screen readers */
.doc h2 { font-size: 1.5rem; margin: 48px 0 16px; scroll-margin-top: calc(var(--header-height) + 16px); }
.doc h3 { font-size: 1.05rem; margin: 0 0 8px; }
.doc p, .doc li, .doc dd { line-height: 1.65; }
.doc a { text-decoration: underline; }

.doc-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.doc-nav a {
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid var(--color-divider);
    border-radius: 999px;
    font-size: 0.9rem;
}
.doc-nav a[aria-current="page"] { background: var(--color-header-bg); border-color: var(--color-header-bg); color: #fff; }

.doc-lead { font-size: 1.15rem; line-height: 1.6; margin: 0 0 8px; }
.doc-note { font-size: 0.9rem; color: #555; }
.doc-cta { margin-top: 48px; font-weight: 600; }
.doc-links li { margin-bottom: 8px; }

.doc-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.doc-features section { background: var(--color-soft-bg); border-radius: 12px; padding: 20px; }
.doc-features h3 i { color: var(--color-accent); margin-right: 6px; }
.doc-features p { margin: 0; font-size: 0.95rem; }

.doc-figure { margin: 24px 0; }
.doc-figure img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    background: #eee;
}
.doc-figure figcaption { font-size: 0.85rem; color: #555; margin-top: 8px; text-align: center; }
.doc-figures-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.doc-phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 760px; margin: 0 auto; }
.doc-figure.phone img { border-radius: 24px; }

/* App user guide: steps on the left, the matching phone screen on the right (stacked on small screens). */
.guide-row { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 32px; align-items: start; }
.guide-row .doc-figure { margin: 0; }
.guide-shots { display: grid; grid-template-columns: repeat(2, 220px); gap: 20px; justify-content: center; margin: 24px 0; }
.guide-shots .doc-figure { margin: 0; }
.guide-note { background: var(--color-soft-bg); border-radius: 10px; padding: 12px 16px; }
.doc ol.guide-steps > li { margin-bottom: 6px; }

/* Architecture overview: rows of boxes with the transport between them. */
.arch { margin: 32px 0; padding: 24px; background: var(--color-soft-bg); border-radius: 12px; }
.arch-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.arch-box {
    flex: 1 1 200px;
    max-width: 300px;
    border-radius: 10px;
    padding: 12px 14px;
    background: var(--color-body-bg);
    border-top: 4px solid var(--color-primary);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    text-align: center;
}
.arch-row:has(> .arch-box:only-child) .arch-box { max-width: 620px; }
.arch-box strong { display: block; }
.arch-box span { font-size: 0.85rem; color: #555; }
.arch-box.client { border-top-color: #4a90d9; }
.arch-box.edge { border-top-color: #7b61c9; }
.arch-box.core { border-top-color: var(--color-accent); }
.arch-box.data { border-top-color: #3a9a6a; }
.arch-box.device { border-top-color: #d9822b; }
.arch-box.hw { border-top-color: #777; }
.arch-arrow { text-align: center; font-size: 0.8rem; color: #555; margin: 8px 0; }
.arch-arrow::before { content: "↕ "; }

.doc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.doc-stats div { background: var(--color-soft-bg); border-radius: 12px; padding: 16px; text-align: center; }
.doc-stats strong { display: block; font-size: 1.6rem; }
.doc-stats span { font-size: 0.85rem; color: #555; }

/* Clean architecture: nested rings, Domain in the centre. */
.layers { max-width: 620px; margin: 32px auto 8px; text-align: center; font-size: 0.85rem; }
.layer { border-radius: 16px; padding: 12px 16px 16px; }
.layer > span { display: block; margin-bottom: 10px; font-weight: 600; }
.layer.outer { background: #e8eef6; }
.layer.infra { background: #d6e2f0; }
.layer.app { background: #f3e7c6; }
.layer.domain { background: var(--color-accent); color: #fff; padding: 18px; }
.layer.domain > span { margin: 0; }

.doc-defs dt { font-weight: 700; margin-top: 16px; }
.doc-defs dd { margin: 4px 0 0; }

.doc-code {
    background: #1e1e1e;
    color: #e6e6e6;
    border-radius: 10px;
    padding: 16px 18px;
    overflow-x: auto;
    font-size: 0.82rem;
    line-height: 1.5;
}
.doc p code, .doc li code { background: var(--color-soft-bg); padding: 1px 5px; border-radius: 4px; font-size: 0.9em; }

@media (max-width: 800px) {
    .doc-features, .doc-stats { grid-template-columns: 1fr 1fr; }
    .doc-figures-2 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .guide-row { grid-template-columns: 1fr; }
    .guide-row .doc-figure { max-width: 220px; margin: 0 auto; }
}
@media (max-width: 560px) {
    .guide-shots { grid-template-columns: minmax(0, 220px); }
    .doc-features, .doc-stats, .doc-phones { grid-template-columns: 1fr; }
    .doc-phones { max-width: 320px; }
}

.service-more { text-decoration: underline; font-weight: 600; }
.doc .app-store-link { text-decoration: none; }
