/* =============================
   Fantomowa Sfera — style.css
   Design: gradient_modern (modern gradients, smooth transitions)
   Brand: dark high‑tech with neon accent
   ============================= */

/* ========== CSS RESET & NORMALIZE ========== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0 0 16px; padding-left: 20px; }
blockquote { margin: 0; padding: 0; }

/* ========== THEME TOKENS (with fallbacks) ========== */
:root {
  --color-primary: #0B1020;
  --color-secondary: #00E5A8;
  --color-accent: #FFFFFF;
  --color-surface: #11172B; /* card surface */
  --color-surface-2: #0F1630; /* alt surface */
  --color-muted: #B5C0D0;
  --color-text: #EAF1FF;
  --color-text-dark: #0B1020;
  --shadow-soft: 0 8px 24px rgba(0,0,0,0.25);
  --shadow-hover: 0 10px 28px rgba(0,0,0,0.32);
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: 0.28s ease;
}

/* ========== BASE TYPOGRAPHY & BODY ========== */
html { scroll-behavior: smooth; }
body {
  font-family: Verdana, Geneva, sans-serif; /* body font */
  color: var(--color-text, #EAF1FF);
  line-height: 1.6;
  background-color: #0B1020; /* fallback */
  background-image: linear-gradient(180deg, rgba(11,16,32,1) 0%, rgba(16,27,55,1) 60%, rgba(11,16,32,1) 100%);
}

h1, h2, h3, h4 { font-family: "Trebuchet MS", Verdana, sans-serif; line-height: 1.25; margin: 0 0 16px; }
h1 { font-size: 32px; letter-spacing: 0.2px; }
h2 { font-size: 24px; letter-spacing: 0.2px; }
h3 { font-size: 18px; letter-spacing: 0.2px; }
p { margin: 0 0 16px; }
strong { font-weight: 700; }

a { color: var(--color-secondary, #00E5A8); text-decoration: none; transition: color var(--transition), opacity var(--transition); }
a:hover { opacity: 0.9; }
a:focus { outline: 2px solid var(--color-secondary, #00E5A8); outline-offset: 2px; border-radius: 4px; }

/* ========== LAYOUT UTILITIES (FLEX-ONLY) ========== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex; /* flex-only */
  flex-direction: column;
  align-items: stretch;
}
.content-wrapper {
  display: flex; /* flex-only */
  flex-direction: column;
  gap: 20px; /* breathing room */
  align-items: flex-start;
  justify-content: flex-start;
}

/* Mandatory spacing classes (as required) */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Default section rhythm for all pages */
main section { margin-bottom: 60px; padding: 40px 0; }

/* ========== HEADER ========== */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background-color: rgba(11,16,32,0.9);
  backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-header .content-wrapper {
  padding: 14px 0;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; }
.logo img { height: 36px; width: auto; transition: transform var(--transition); }
.logo:hover img { transform: translateY(-1px); }

.main-nav { display: none; gap: 16px; align-items: center; }
.main-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--color-text, #EAF1FF);
  transition: background-color var(--transition), color var(--transition), transform var(--transition);
}
.main-nav a:hover { background-color: rgba(255,255,255,0.06); transform: translateY(-1px); }

.header-cta { display: flex; gap: 12px; align-items: center; }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px; border-radius: 12px;
  font-weight: 700; letter-spacing: 0.2px;
  transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition), color var(--transition);
  box-shadow: var(--shadow-soft);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn:active { transform: translateY(0); }
.btn:focus { outline: 2px solid var(--color-secondary, #00E5A8); outline-offset: 2px; }

.btn-primary {
  color: #0B1020;
  background-color: #00E5A8; /* fallback solid */
  background-image: linear-gradient(135deg, #00E5A8 0%, #61FFD3 100%);
}
.btn-primary:hover { color: #0B1020; }

.btn-secondary {
  color: var(--color-accent, #FFFFFF);
  background-color: #18233E; /* fallback solid */
  background-image: linear-gradient(135deg, #18233E 0%, #25345C 100%);
  border: 1px solid rgba(255,255,255,0.12);
}
.btn-secondary:hover { color: var(--color-accent, #FFFFFF); }

/* Inline actions containers */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ========== HERO ========== */
.hero {
  background-color: #0B1020; /* fallback */
  background-image: linear-gradient(180deg, #0B1020 0%, #0F1630 60%, #0B1020 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.hero .content-wrapper {
  padding: 40px 0 20px;
  align-items: flex-start;
}
.hero h1 { font-size: 32px; }
.hero p { max-width: 850px; color: var(--color-muted, #B5C0D0); }

/* ========== TEXT & LISTS ========== */
.text-section { display: flex; flex-direction: column; gap: 10px; }
.text-section ul, .text-section ol { padding-left: 20px; }
.text-section li { margin-bottom: 8px; }
.text-section a { text-decoration: underline; text-underline-offset: 3px; }

/* ========== CARDS & GRIDS (flex-only) ========== */
.card {
  background-color: var(--color-surface, #11172B);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: rgba(0,229,168,0.4); }

/* Optional utility for evenly sized items inside flex rows */
.flex-col-2 { flex: 1 1 calc(50% - 12px); min-width: 260px; }
.flex-col-3 { flex: 1 1 calc(33.333% - 14px); min-width: 220px; }

/* ========== TESTIMONIALS (light cards, dark text for readability) ========== */
.testimonial-card {
  background-color: #FFFFFF;
  color: var(--color-text-dark, #0B1020);
  border: 1px solid rgba(11,16,32,0.12);
  border-left: 4px solid var(--color-secondary, #00E5A8);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
.testimonial-card blockquote { font-size: 16px; color: #111; }
.testimonial-card p { margin: 0; color: #222; }

/* ========== FOOTER ========== */
.site-footer {
  background-color: #0B1020;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.site-footer .content-wrapper { padding: 24px 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-nav a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--color-muted, #B5C0D0);
  transition: background-color var(--transition), color var(--transition);
}
.footer-nav a:hover { background-color: rgba(255,255,255,0.06); color: var(--color-accent, #FFFFFF); }

/* ========== NAVIGATION: MOBILE BURGER MENU ========== */
.mobile-menu-toggle {
  position: fixed; right: 16px; top: 14px; z-index: 1100;
  width: 44px; height: 44px; border-radius: 10px;
  background-color: rgba(255,255,255,0.08);
  color: var(--color-accent, #FFFFFF);
  display: flex; align-items: center; justify-content: center;
  transition: background-color var(--transition), transform var(--transition);
}
.mobile-menu-toggle:hover { background-color: rgba(255,255,255,0.14); transform: translateY(-1px); }

.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  display: flex; /* flex-only */
  flex-direction: column; justify-content: flex-start; align-items: stretch;
  background-color: rgba(11,16,32,0.96);
  transform: translateX(100%);
  transition: transform var(--transition);
  z-index: 1200;
}
.mobile-menu[aria-hidden="false"] { transform: translateX(0%); }

.mobile-menu-close {
  position: absolute; right: 16px; top: 14px; z-index: 1210;
  width: 44px; height: 44px; border-radius: 10px;
  background-color: rgba(255,255,255,0.08);
  color: var(--color-accent, #FFFFFF);
  display: flex; align-items: center; justify-content: center;
}
.mobile-nav {
  display: flex; flex-direction: column; gap: 8px; padding: 80px 20px 20px;
}
.mobile-nav a {
  display: flex; align-items: center; min-height: 48px;
  padding: 12px 14px;
  border-radius: 10px;
  background-color: rgba(255,255,255,0.06);
  color: var(--color-accent, #FFFFFF);
  font-size: 16px;
  transition: background-color var(--transition), transform var(--transition);
}
.mobile-nav a:hover { background-color: rgba(255,255,255,0.12); transform: translateX(2px); }

/* Hide desktop nav on mobile; show burger */
@media (min-width: 992px) {
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }
}

/* ========== COOKIE CONSENT (banner + modal) ========== */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1300;
  display: flex; /* flex-only */
  flex-direction: column; gap: 12px; align-items: stretch;
  background-color: #0F1630;
  color: var(--color-text, #EAF1FF);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 16px 20px;
  box-shadow: 0 -10px 24px rgba(0,0,0,0.25);
  transform: translateY(110%);
  transition: transform var(--transition);
}
.cookie-banner.is-visible { transform: translateY(0%); }
.cookie-banner p { margin: 0; font-size: 14px; color: var(--color-muted, #B5C0D0); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-btn { padding: 10px 14px; border-radius: 10px; font-weight: 700; box-shadow: var(--shadow-soft); }
.cookie-btn.accept { background-color: #00E5A8; color: #0B1020; }
.cookie-btn.reject { background-color: #25345C; color: #FFFFFF; border: 1px solid rgba(255,255,255,0.16); }
.cookie-btn.settings { background-color: transparent; color: #FFFFFF; border: 1px solid rgba(255,255,255,0.24); }
.cookie-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }

.cookie-overlay {
  position: fixed; inset: 0; z-index: 1400;
  background: rgba(0,0,0,0.55);
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.cookie-overlay.is-open { opacity: 1; pointer-events: all; }
.cookie-modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.96);
  z-index: 1410; width: min(720px, 92vw);
  background: #FFFFFF; color: #0B1020; border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
  padding: 20px; display: flex; flex-direction: column; gap: 16px;
  opacity: 0; pointer-events: none; transition: transform var(--transition), opacity var(--transition);
}
.cookie-modal.is-open { opacity: 1; pointer-events: all; transform: translate(-50%, -50%) scale(1); }
.cookie-modal h3 { margin: 0 0 8px; }
.cookie-categories { display: flex; flex-direction: column; gap: 12px; }
.cookie-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border: 1px solid #E6E8EF; border-radius: 10px; background: #F7F9FC; }
.cookie-row .always { font-size: 12px; color: #4B5563; }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cookie-toggle { width: 42px; height: 26px; background: #CBD5E1; border-radius: 26px; position: relative; transition: background var(--transition); }
.cookie-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #FFFFFF; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,0.25); transition: left var(--transition); }
.cookie-toggle.is-on { background: #00E5A8; }
.cookie-toggle.is-on::after { left: 19px; }

/* ========== RESPONSIVE TYPOGRAPHY & LAYOUT ========== */
@media (min-width: 600px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  .hero h1 { font-size: 38px; }
}
@media (min-width: 768px) {
  .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; }
  .text-image-section { flex-direction: row; }
  .hero h1 { font-size: 44px; }
}
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; align-items: center; }
}
@media (min-width: 992px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  .logo img { height: 42px; }
}

/* ========== GENERAL ELEMENT ENHANCEMENTS ========== */
hr { border: none; height: 1px; background: rgba(255,255,255,0.08); margin: 24px 0; }

/* Lists with accent bullets (progressive enhancement) */
.text-section ul { list-style: none; padding-left: 0; }
.text-section ul li { position: relative; padding-left: 22px; }
.text-section ul li::before { content: ""; position: absolute; left: 0; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: #00E5A8; box-shadow: 0 0 0 3px rgba(0,229,168,0.18); }

/* Links inside dark areas */
.hero a { text-decoration: underline; text-underline-offset: 3px; }

/* ========== PAGE-SPECIFIC TOUCHES (generic classes present in HTML) ========== */
.hero .actions .btn { margin-top: 4px; }

/* Ensure adequate spacing to prevent overlaps */
main .container + .container { margin-top: 20px; }

/* ========== ACCESSIBILITY FOCUS RING ========== */
:focus-visible { outline: 2px solid var(--color-secondary, #00E5A8); outline-offset: 2px; border-radius: 6px; }

/* ========== MISC UTILITIES ========== */
.muted { color: var(--color-muted, #B5C0D0); }
.center { display: flex; align-items: center; justify-content: center; }

/* ========== ENSURE FLEX USE IN COMMON WRAPPERS ========== */
nav[aria-label] { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
header .container, footer .container { display: flex; }

/* ========== PRINT BASIC (optional) ========== */
@media print {
  .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-overlay, .cookie-modal { display: none !important; }
  a { text-decoration: underline; }
}
