/* ==========================================================================
   CloudVisual Group — modern one-page styles (2026 rebuild)
   Replaces the 2014 Rhythm theme on index.html only.
   404.html still uses the legacy css/style.css.
   ========================================================================== */

:root {
    --accent: #4da5f5;
    --accent-dark: #2b7fd4;
    --ink: #1b2733;
    --ink-soft: #51606e;
    --paper: #ffffff;
    --paper-alt: #f4f7fa;
    --dark: #0d1520;
    --dark-soft: #16202e;
    --line: #e3e9ef;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(13, 21, 32, 0.10);
    --wrap: 1180px;
}

@font-face {
    font-family: 'cloudvisualregular';
    src: url('../fonts/cloudvisual-webfont.woff2') format('woff2'),
         url('../fonts/cloudvisual-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

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

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
}

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

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

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

.brandfont {
    font-family: 'cloudvisualregular', Arial, sans-serif;
    font-weight: normal;
    letter-spacing: 0.14em;
}

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

/* ---------- skip link ---------- */

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 300;
    background: var(--dark);
    color: #fff;
    padding: 10px 18px;
    border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- header / nav ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 16px;
}

.site-logo img { display: block; width: 190px; }

.site-nav ul {
    display: flex;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav a {
    display: block;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink-soft);
    border-radius: 8px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--ink);
    background: var(--paper-alt);
}

.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    background: transparent;
    border-radius: 8px;
    padding: 9px 11px;
    cursor: pointer;
    color: var(--ink);
}

.nav-toggle svg { display: block; }

@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        display: none;
    }
    .site-nav.open { display: block; }
    .site-nav ul { flex-direction: column; padding: 10px 16px 16px; }
    .site-nav a { padding: 13px 10px; }
}

/* ---------- hero ---------- */

.hero {
    position: relative;
    min-height: min(92vh, 880px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background: var(--dark) url('../files/uploads/cloudvisual-group.jpg') center / cover no-repeat;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13,21,32,0.55) 0%, rgba(13,21,32,0.35) 45%, rgba(13,21,32,0.72) 100%);
}

.hero .wrap { position: relative; padding-top: 72px; padding-bottom: 72px; }

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(30px, 6vw, 62px);
    line-height: 1.15;
}

.hero .tagline {
    margin: 0 auto 34px;
    max-width: 640px;
    font-size: clamp(16px, 2.2vw, 21px);
    color: rgba(255, 255, 255, 0.88);
}

.btn {
    display: inline-block;
    padding: 14px 30px;
    margin: 4px 6px;
    border-radius: 999px;
    border: 2px solid transparent;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-solid {
    background: var(--accent);
    color: #fff;
}
.btn-solid:hover, .btn-solid:focus-visible { background: var(--accent-dark); color: #fff; }

.btn-ghost {
    border-color: rgba(255, 255, 255, 0.75);
    color: #fff;
    background: transparent;
}
.btn-ghost:hover, .btn-ghost:focus-visible { background: rgba(255, 255, 255, 0.14); color: #fff; }

/* ---------- sections ---------- */

.section { padding: 88px 0; }
.section-alt { background: var(--paper-alt); }
.section-dark {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.9);
}

.section-head {
    max-width: 720px;
    margin: 0 auto 52px;
    text-align: center;
}

.section-head h2 {
    margin: 0 0 14px;
    font-size: clamp(26px, 3.6vw, 38px);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.section-dark .section-head h2 { color: #fff; }

.section-head p { margin: 0; color: var(--ink-soft); }
.section-dark .section-head p { color: rgba(255, 255, 255, 0.75); }

.rule {
    width: 46px;
    height: 3px;
    margin: 0 auto 18px;
    background: var(--accent);
    border: 0;
    border-radius: 2px;
}

/* ---------- prose blocks ---------- */

.prose {
    max-width: 760px;
    margin: 0 auto;
}

.prose p { color: var(--ink-soft); }

.section-dark .prose p { color: rgba(255, 255, 255, 0.75); }

.prose + .stats { margin-top: 56px; }

/* ---------- services ---------- */

.services {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 980px;
    margin: 0 auto;
}

@media (max-width: 760px) {
    .services { grid-template-columns: 1fr; }
}

.service {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 32px;
    box-shadow: var(--shadow);
}

.service h3 {
    margin: 0 0 12px;
    font-size: 19px;
    letter-spacing: -0.01em;
}

.service p { margin: 0; color: var(--ink-soft); font-size: 16px; }

/* ---------- stats ---------- */

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

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

.stat-number {
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 200;
    line-height: 1;
    color: #fff;
}

.stat-label {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}

/* ---------- company cards ---------- */

.companies {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

@media (max-width: 860px) {
    .companies { grid-template-columns: 1fr; }
}

.company {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.company-media {
    position: relative;
    aspect-ratio: 21 / 9;
    overflow: hidden;
    background: var(--dark-soft);
}

.company-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.company-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 28px 30px 30px;
}

.company-logo {
    height: 64px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-logo img {
    max-height: 100%;
    width: auto;
    max-width: 300px;
}

.company-body h3 {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.company-body p { margin: 0 0 16px; color: var(--ink-soft); }

.company-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.company-tags li {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--accent-dark);
    background: rgba(77, 165, 245, 0.12);
    padding: 5px 12px;
    border-radius: 999px;
}

.company-meta {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.company-director {
    font-size: 14px;
    color: var(--ink-soft);
}

.company-director strong {
    display: block;
    font-size: 15px;
    color: var(--ink);
}

.company-link {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--accent-dark);
    white-space: nowrap;
}

.company-link:hover, .company-link:focus-visible { color: var(--accent); }

/* ---------- certifications ---------- */

.certs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: center;
    max-width: 860px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .certs { grid-template-columns: 1fr; max-width: 320px; }
}

.cert {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 170px;
}

.cert img { max-height: 120px; width: auto; }

/* ---------- showreels ---------- */

.reels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

@media (max-width: 760px) {
    .reels { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
}

.reels-single {
    grid-template-columns: 1fr;
    max-width: 780px;
    margin: 0 auto;
}

.reel {
    position: relative;
    display: block;
    border: 0;
    padding: 0;
    background: none;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.reel img { display: block; width: 100%; }

.reel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(13, 21, 32, 0.25);
    transition: background 0.2s;
}

.reel:hover::after, .reel:focus-visible::after { background: rgba(13, 21, 32, 0.05); }

.reel-play {
    position: absolute;
    z-index: 1;
    inset: 0;
    margin: auto;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.reel-play svg { margin-left: 4px; }

.reel-label {
    position: absolute;
    z-index: 1;
    left: 14px;
    bottom: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

dialog.reel-dialog {
    width: min(920px, 94vw);
    border: 0;
    border-radius: var(--radius);
    padding: 0;
    background: #000;
    overflow: hidden;
}

dialog.reel-dialog::backdrop { background: rgba(8, 12, 18, 0.85); }

.reel-frame {
    aspect-ratio: 16 / 9;
    width: 100%;
    border: 0;
    display: block;
}

.reel-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    border: 0;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

/* ---------- contact ---------- */

.contact-grid {
    max-width: 720px;
    margin: 0 auto;
}

.field { margin-bottom: 18px; }

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.field input,
.field textarea {
    width: 100%;
    padding: 14px 16px;
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.field textarea { min-height: 150px; resize: vertical; }

.field input:focus-visible,
.field textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}

.hp-field {
    position: absolute;
    left: -9999px;
    top: auto;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.form-note { font-size: 14px; color: var(--ink-soft); margin: 0; }

#form-result { margin-top: 18px; }

#form-result .success,
#form-result .error {
    padding: 14px 18px;
    border-radius: 10px;
    font-weight: 600;
}

#form-result .success { background: #e5f6ec; color: #14663b; }
#form-result .error { background: #fdeaea; color: #a12626; }

/* ---------- footer ---------- */

.site-footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 64px 0 48px;
}

.site-footer .footer-logo img { width: 220px; }

.footer-social {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 28px 0 26px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.85);
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.footer-social a:hover, .footer-social a:focus-visible {
    color: #fff;
    border-color: var(--accent);
    background: rgba(77, 165, 245, 0.18);
}

.footer-copy { font-size: 14px; margin: 0; }

/* ---------- reveal on scroll (progressive enhancement) ---------- */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
}
