/* ========================================================================
   DS Tech Solution — Design System: "Digital Architect"
   ======================================================================== */

:root {
    --color-bg: #111317;
    --color-surface-low: #1a1c20;
    --color-surface: #1e2024;
    --color-surface-high: #282a2e;
    --color-primary: #b6c4ff;
    --color-primary-container: #0059ff;
    --color-tertiary: #00daf3;
    --color-on-bg: #e2e2e8;
    --color-on-surface-variant: #c3c5d9;
    --color-outline-variant: #434656;
    --font-size-base: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: var(--font-size-base); }

body {
    font-family: 'Assistant', 'Manrope', sans-serif;
    background-color: #111317;
    color: #e2e2e8;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Assistant', 'Space Grotesk', sans-serif;
    font-weight: 700;
}

/* Hebrew-aware headline font */
.font-headline { font-family: 'Assistant', 'Space Grotesk', sans-serif; }
.font-body    { font-family: 'Assistant', 'Manrope', sans-serif; }
.font-label   { font-family: 'Assistant', 'Manrope', sans-serif; }

/* Material Symbols defaults */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
    user-select: none;
}

/* Glass panel shared utility */
.glass-panel {
    background: rgba(30, 32, 36, 0.7);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.text-gradient {
    background: linear-gradient(135deg, #b6c4ff 0%, #00daf3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Focus ring for keyboard navigation */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid #00daf3;
    outline-offset: 3px;
    border-radius: 4px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -60px;
    right: 20px;
    z-index: 100;
    background: #0059ff;
    color: #e7eaff;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus { top: 20px; }

/* Selection */
::selection { background: rgba(0, 218, 243, 0.3); color: #bef4ff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0c0e12; }
::-webkit-scrollbar-thumb { background: #282a2e; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #434656; }

/* Scroll reveal animation — only hides when JS has loaded */
.reveal { opacity: 1; }
html.js-ready .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
html.js-ready .reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ambient glow helper */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

/* ============ ACCESSIBILITY PANEL ============ */
.a11y-float-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0059ff, #003bb0);
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.15);
    box-shadow: 0 8px 24px rgba(0,89,255,0.45);
    cursor: pointer;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, box-shadow 0.25s;
}
.a11y-float-btn:hover { transform: scale(1.08); box-shadow: 0 10px 30px rgba(0,89,255,0.6); }
.a11y-float-btn .material-symbols-outlined { font-size: 30px; }

.a11y-panel {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: min(380px, calc(100vw - 48px));
    max-height: min(80vh, 720px);
    overflow-y: auto;
    background: #1e2024;
    color: #e2e2e8;
    border: 1px solid rgba(67,70,86,0.4);
    border-radius: 20px;
    box-shadow: 0 32px 64px -15px rgba(0,0,0,0.7);
    z-index: 90;
    transform: translateY(24px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    font-family: 'Assistant', sans-serif;
}
.a11y-panel.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.a11y-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(67,70,86,0.25);
    background: linear-gradient(135deg, rgba(0,89,255,0.18), rgba(0,218,243,0.08));
    border-radius: 20px 20px 0 0;
}
.a11y-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}
.a11y-title .material-symbols-outlined { color: #b6c4ff; font-size: 22px; }
.a11y-close {
    background: transparent;
    color: #c3c5d9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.a11y-close:hover { background: rgba(255,255,255,0.08); color: #ffffff; }

.a11y-content { padding: 18px 22px 24px; }
.a11y-section { margin-bottom: 22px; }
.a11y-section-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #00daf3;
    margin: 0 0 12px;
}

.a11y-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.a11y-btn {
    background: #282a2e;
    color: #e2e2e8;
    border: 1px solid rgba(67,70,86,0.4);
    padding: 12px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    min-height: 64px;
    font-family: inherit;
}
.a11y-btn:hover { background: #333539; border-color: #00daf3; }
.a11y-btn[aria-pressed="true"] { background: #0059ff; border-color: #b6c4ff; color: #e7eaff; }
.a11y-btn .material-symbols-outlined { font-size: 22px; color: #b6c4ff; }
.a11y-btn[aria-pressed="true"] .material-symbols-outlined { color: #ffffff; }

.a11y-reset-btn {
    width: 100%;
    background: transparent;
    color: #ffb4ab;
    border: 1px solid rgba(255,180,171,0.35);
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: inherit;
}
.a11y-reset-btn:hover { background: rgba(255,180,171,0.1); }

.a11y-statement {
    font-size: 13px;
    line-height: 1.65;
    color: #c3c5d9;
    padding-top: 18px;
    border-top: 1px solid rgba(67,70,86,0.25);
}
.a11y-statement h3 { color: #ffffff; font-size: 15px; margin: 0 0 10px; }
.a11y-statement p { margin: 0 0 10px; }
.a11y-statement a { color: #00daf3; font-weight: 600; }

.a11y-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 85;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.a11y-backdrop.open { opacity: 1; pointer-events: auto; }

/* ============ A11Y BODY MODES ============ */
body.a11y-contrast {
    background: #000000 !important;
    color: #ffffff !important;
}
body.a11y-contrast * {
    background-color: transparent !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}
body.a11y-contrast a { color: #ffff00 !important; text-decoration: underline !important; }
body.a11y-contrast button { background: #ffffff !important; color: #000000 !important; }
body.a11y-contrast img { filter: grayscale(1) contrast(1.2); }

body.a11y-grayscale { filter: grayscale(1); }

body.a11y-highlight-links a {
    background: #ffff00 !important;
    color: #000000 !important;
    padding: 2px 6px !important;
    text-decoration: underline !important;
    font-weight: 900 !important;
    border-radius: 4px;
}

body.a11y-readable-font,
body.a11y-readable-font * {
    font-family: 'Arial', 'Helvetica', sans-serif !important;
    letter-spacing: 0.02em !important;
}

body.a11y-stop-animations *,
body.a11y-stop-animations *::before,
body.a11y-stop-animations *::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
}

body.a11y-big-cursor,
body.a11y-big-cursor * {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'><path d='M6 4 L6 40 L16 30 L22 42 L28 40 L22 28 L36 28 Z' fill='white' stroke='black' stroke-width='2'/></svg>") 4 4, auto !important;
}

/* ============ CONTACT FORM ============ */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.form-label {
    font-size: 13px;
    font-weight: 700;
    color: #b6c4ff;
    letter-spacing: 0.03em;
}
.form-input,
.form-textarea {
    background: rgba(30,32,36,0.6);
    border: 1px solid rgba(67,70,86,0.4);
    border-bottom: 2px solid rgba(67,70,86,0.5);
    color: #e2e2e8;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: border 0.2s, background 0.2s;
    width: 100%;
    resize: vertical;
}
.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-bottom-color: #00daf3;
    background: rgba(30,32,36,0.9);
}
.form-textarea { min-height: 140px; }

/* ============ BREAKPOINTS ============ */
@media (max-width: 1280px) {
    .container-wide { padding-left: 2rem; padding-right: 2rem; }
}

@media (max-width: 1024px) {
    h1 { font-size: clamp(2.25rem, 6vw, 3.5rem) !important; }
    h2 { font-size: clamp(1.875rem, 4.5vw, 2.75rem) !important; }
}

@media (max-width: 768px) {
    .a11y-float-btn { width: 52px; height: 52px; bottom: 20px; left: 20px; }
    .a11y-float-btn .material-symbols-outlined { font-size: 26px; }
    .a11y-panel { width: calc(100vw - 32px); left: 16px; bottom: 84px; }
    h1 { font-size: clamp(2rem, 7vw, 2.75rem) !important; line-height: 1.15 !important; }
    h2 { font-size: clamp(1.625rem, 5.5vw, 2.25rem) !important; }
    h3 { font-size: clamp(1.25rem, 4vw, 1.75rem) !important; }
    p { font-size: 1rem !important; }
    section { padding-top: 4rem !important; padding-bottom: 4rem !important; }
}

@media (max-width: 576px) {
    .a11y-buttons { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem !important; }
}

@media (max-width: 375px) {
    body { font-size: 15px; }
    h1 { font-size: 1.85rem !important; }
    .hide-xs { display: none !important; }
}

/* Ensure no horizontal overflow anywhere */
html, body { max-width: 100vw; overflow-x: hidden; }

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Touch target min-size on mobile */
@media (pointer: coarse) {
    button, a.btn, .nav-link {
        min-height: 44px;
        min-width: 44px;
    }
}
