/* ============================================
   OREV ITX – Professional IT Support Layout
   RTL, responsive, clean
   ============================================ */

:root {
  --bg: #f5f7fa;
  --bg-card: #ffffff;
  --bg-card-hover: #eef1f5;
  --border: #e2e6ec;
  --text: #1a2332;
  --text-muted: #5c6b7c;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --success: #16a34a;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --font-he: "Heebo", "Segoe UI", sans-serif;
}

/* Dark theme */
[data-theme="dark"] {
  --bg: #0f1419;
  --bg-card: #1a222d;
  --bg-card-hover: #232d3b;
  --border: #2d3a4a;
  --text: #e6edf3;
  --text-muted: #8b9cad;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}


html {
  font-size: 16px;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ----- Skip link (a11y) ----- */
.skip-link {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  z-index: 100;
  border: none;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
}

.skip-link:focus {
  clip: auto;
  clip-path: none;
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

body {
  margin: 0;
  font-family: var(--font-he);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  direction: rtl;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ----- Layout ----- */
.wrapper {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ----- Header ----- */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

/* Dual brand: Logs + OREV ITX */
.brand-dual {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-dual a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}

.brand-dual .logs-logo {
  height: 72px;
  width: auto;
  display: block;
  object-fit: contain;
}

.brand-dual .itx-logo {
  height: 28px;
  width: auto;
  display: block;
  object-fit: contain;
}

.brand-dual .brand-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
  flex-shrink: 0;
}

.brand img {
  height: 44px;
  width: auto;
  display: block;
}

.brand-text {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.brand-dual .brand-text {
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--accent);
  background: rgba(37, 99, 235, 0.1);
}

.nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[data-theme="dark"] .nav-link:hover {
  background: rgba(59, 130, 246, 0.1);
}

/* ----- Main ----- */
main {
  flex: 1;
  padding: 2.5rem 0 3rem;
}

.hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.hero p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ----- Section titles ----- */
.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-title-secondary {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* ----- Blinking red arrow (flush left of Atera card, RTL) ----- */
.atera-arrow-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-left: 0;
  width: clamp(200px, 35vw, 320px);
  min-width: 180px;
  pointer-events: none;
}

/* RTL: arrow is left of card, points right toward the card */
.atera-arrow {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}

.atera-arrow .arrow-head {
  animation: atera-arrow-blink 1.2s ease-in-out infinite;
}

/* Curved tail waves from base (sacrum) */
.arrow-tail-wrap {
  transform-origin: 200px 30px;
  animation: tail-wave 2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .atera-arrow .arrow-head {
    animation: none;
    opacity: 0.9;
  }
  .arrow-tail-wrap {
    animation: none;
  }
}

@keyframes tail-wave {
  0%, 100% { transform: rotate(-6deg); }
  50%      { transform: rotate(6deg); }
}

@keyframes atera-arrow-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

@media (max-width: 640px) {
  .atera-arrow-wrap {
    width: clamp(140px, 40vw, 220px);
  }
}

.atera-section {
  margin-bottom: 0.5rem;
}

.atera-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.75rem;
  letter-spacing: 0.02em;
}

.download-grid-atera {
  margin-bottom: 0;
  grid-template-columns: 1fr auto;
  gap: 0;
  align-items: center;
}

.download-card-atera {
  border-color: var(--accent);
  border-width: 2px;
  padding: 1.5rem 1.75rem;
}

.download-card-atera .card-title {
  font-size: 1.15rem;
}

/* ----- Download cards grid ----- */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.download-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  text-align: right;
}

.download-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.download-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .download-card:hover {
    transform: none;
  }
}

.download-card .card-title {
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.download-card .card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.download-card .card-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-top: 0.5rem;
}


/* Links page: category blocks */
.links-intro {
  margin-bottom: 2rem;
  color: var(--text-muted);
}

.link-category {
  margin-bottom: 2.5rem;
}

.link-category:last-of-type {
  margin-bottom: 0;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}

.link-list a:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

.link-list a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.link-list a .arrow {
  color: var(--text-muted);
  font-size: 0.9em;
  transition: color 0.2s, transform 0.2s;
}

.link-list a:hover .arrow {
  color: var(--accent);
  transform: translateX(-4px);
}

/* ----- Footer ----- */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: auto;
}

.site-footer .wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer .brand {
  opacity: 0.9;
}

.site-footer .logs-logo {
  height: 56px;
}

.site-footer .itx-logo {
  height: 22px;
}

.site-footer .brand-divider {
  height: 36px;
}

.footer-copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ----- Back link (links page) ----- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--accent);
}

.back-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.brand:focus-visible,
.brand-dual a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ----- Theme toggle (bottom left) ----- */
.theme-toggle {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 20;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.15s;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle:hover {
    transform: none;
  }
}

.theme-toggle:focus {
  outline: none;
}

.theme-toggle:focus-visible {
  box-shadow: 0 0 0 2px var(--accent);
}

.theme-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
}

.theme-toggle .icon-moon {
  opacity: 0;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 0;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 1;
}

/* ----- Responsive ----- */
@media (max-width: 640px) {
  .site-header .wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-dual {
    justify-content: center;
  }

  .brand-dual .brand-divider {
    height: 40px;
  }

  .brand {
    justify-content: center;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .link-list {
    grid-template-columns: 1fr;
  }
}
