/*
Theme Name: Shnabel Itkin
Theme URI: https://shnabel-itkin.co.il
Author: Shnabel Itkin Engineering
Description: Custom WordPress theme for Shnabel Itkin Electrical Engineering Ltd.
Version: 1.0.2
Text Domain: shnabel-itkin
Requires at least: 6.0
Requires PHP: 7.4
*/

/* ===================================================
   Variables, Reset, Typography, Layout
   =================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  --color-black: #000000;
  --color-white: #FFFFFF;
  --color-cream: #F5F5F0;
  --color-accent: #F3633A;
  --color-overlay: rgba(0, 0, 0, 0.15);
  --color-border: #e0e0e0;
  --color-text-secondary: #666;
  --color-text-dark: #1a1a1a;

  --font-primary: 'IBM Plex Sans Hebrew', sans-serif;

  --container-max-width: 1140px;
  --breakpoint-mobile: 767px;
  --breakpoint-tablet: 1024px;

  --spacing-section: 80px;
  --widget-gap: 20px;
}

/* ---------- CSS Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-primary);
  font-weight: 400;
  color: var(--color-black);
  background: var(--color-white);
  line-height: 1.6;
  direction: rtl;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

/* Accessible focus indicator — visible when navigating with keyboard,
   hidden for mouse/touch interactions. */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
}

/* ---------- Typography ---------- */
.heading-xl {
  font-size: clamp(3rem, -3rem + 10.6667vw, 12rem);
  font-weight: 600;
  color: var(--color-white);
}

.heading-lg {
  font-size: clamp(1.25rem, 0.7895rem + 1.8421vw, 3rem);
  font-weight: 700;
  color: var(--color-white);
}

.heading-section {
  font-size: clamp(1.25rem, 0.7895rem + 1.8421vw, 3rem);
  font-weight: 700;
  color: var(--color-black);
}

.heading-team {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 500;
  color: var(--color-text-dark);
}

.text-body {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-black);
  line-height: 1.7;
}

.text-secondary {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--widget-gap);
  width: 100%;
}

.section {
  width: 100%;
  position: relative;
}

/* ---------- Utility ---------- */
.text-center {
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip-to-content link — visible only when focused via keyboard */
.skip-to-content {
  position: absolute;
  top: -100px;
  right: 16px;
  z-index: 100000;
  padding: 12px 20px;
  background: var(--color-black);
  color: var(--color-white);
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: top 0.2s ease;
}

.skip-to-content:focus,
.skip-to-content:focus-visible {
  top: 16px;
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

#main-content {
  outline: none;
}

/* ---------- Text Reveal Animation System ---------- */
.tr-wrapper {
  display: inline-block;
  position: relative;
}

.tr-char,
.tr-word,
.tr-line {
  display: inline-block;
  will-change: transform, opacity;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.tr-space {
  display: inline-block;
}

.tr-initialized {
  overflow: hidden;
}

.tr-initialized .tr-wrapper {
  perspective: 1000px;
}

@media (prefers-reduced-motion: reduce) {
  .tr-char,
  .tr-word,
  .tr-line {
    transition: none !important;
    animation: none !important;
  }
}