﻿/*
Theme Name: ESM Smart Solutions
Theme URI: https://esm.example.com
Author: ESM
Author URI: https://esm.example.com
Description: Premium corporate theme for ESM Smart Solutions — smart building, IoT and building automation. Persian (RTL) first, bilingual FA/EN, with dynamic CPTs for products, projects and solutions.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: esm
Tags: rtl-language-support, custom-colors, custom-post-types, featured-images, translation-ready
*/

/* ==========================================================================
   ESM Theme — CSS Variables & Component Classes
   Tailwind utility classes are provided via the Tailwind Play CDN configured
   with these tokens. This file holds the custom component classes that
   supplement Tailwind.
   ========================================================================== */

/* ==========================================================================
   Peyda WebFont Definitions (Local WOFF2 with Persian Numerals)
   ========================================================================== */
@font-face {
  font-family: 'Peyda';
  src: url('assets/fonts/PeydaWebFaNum-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Peyda';
  src: url('assets/fonts/PeydaWebFaNum-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Peyda';
  src: url('assets/fonts/PeydaWebFaNum-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Peyda';
  src: url('assets/fonts/PeydaWebFaNum-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Peyda';
  src: url('assets/fonts/PeydaWebFaNum-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Peyda';
  src: url('assets/fonts/PeydaWebFaNum-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Peyda';
  src: url('assets/fonts/PeydaWebFaNum-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --esm-void: #020A10;
  --esm-navy-1: #041019;
  --esm-navy-2: #071722;
  --esm-navy-3: #091D29;
  --esm-navy-4: #0B2431;
  --esm-cyan: #00DDF5;
  --esm-cyan-2: #00E5FF;
  --esm-concrete: #F3F4F2;
  --esm-concrete-2: #ECEDE9;
  --esm-concrete-3: #E5E7E8;
  --esm-ink: #08141C;
  --esm-muted: #8E9BA3;
  --esm-muted-2: #AEB8BE;
  --esm-line: rgba(255, 255, 255, 0.12);
  --esm-line-dark: rgba(8, 20, 28, 0.10);
  --font-heading: "Peyda", "Vazirmatn", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Peyda", "Vazirmatn", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Peyda", "Vazirmatn", ui-sans-serif, system-ui, sans-serif;
}

/* ---- Dark Theme Baseline & Global Peyda Typography ---- */
html, body {
  font-family: "Peyda", "Vazirmatn", ui-sans-serif, system-ui, sans-serif !important;
  background-color: #020A10 !important;
  color: #FFFFFF !important;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100%;
}

h1, h2, h3, h4, h5, h6,
.esm-heading,
.font-heading,
.font-display {
  font-family: "Peyda", "Vazirmatn", sans-serif !important;
}

body,
p,
a,
span,
button,
input,
textarea,
select,
label,
.esm-body,
.font-body {
  font-family: "Peyda", "Vazirmatn", sans-serif;
}

#esm-header {
  background-color: rgba(2, 10, 16, 0.92) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.admin-bar #esm-header {
  top: 32px !important;
}
@media screen and (max-width: 782px) {
  .admin-bar #esm-header {
    top: 46px !important;
  }
}

/* ---- Layout ---- */
.esm-container {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 640px) { .esm-container { padding-inline: 2rem; } }
@media (min-width: 1024px) { .esm-container { padding-inline: 3rem; } }

/* ---- Section label ---- */
.esm-section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--esm-cyan);
}
.esm-section-label::before {
  content: "";
  display: block;
  height: 1px;
  width: 1.75rem;
  background: var(--esm-cyan);
  opacity: 0.7;
}

/* ---- Headings ---- */
.esm-heading {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.esm-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--esm-muted);
  max-width: 65ch;
}
.text-balance { text-wrap: balance; }

/* ---- Buttons ---- */
.btn-cyan {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  background: var(--esm-cyan);
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--esm-void);
  transition: all 0.3s;
  min-height: 48px;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.btn-cyan:hover {
  background: var(--esm-cyan-2);
  box-shadow: 0 0 30px -6px var(--esm-cyan);
}

.btn-outline-cyan {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 221, 245, 0.6);
  background: transparent;
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  transition: all 0.3s;
  min-height: 48px;
  text-decoration: none;
}
.btn-outline-cyan:hover {
  background: rgba(0, 221, 245, 0.1);
  border-color: var(--esm-cyan);
}

.btn-ghost-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  backdrop-filter: blur(4px);
  transition: all 0.3s;
  min-height: 48px;
  text-decoration: none;
}
.btn-ghost-dark:hover { background: rgba(255, 255, 255, 0.1); }

/* ---- Tech line ---- */
.esm-tech-line {
  background-image: linear-gradient(to right, transparent, var(--esm-cyan), transparent);
}

/* ---- Grid background ---- */
.esm-grid-bg {
  background-image:
    linear-gradient(rgba(0, 221, 245, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 221, 245, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* ---- Scroll reveal ---- */
.esm-fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.esm-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Logo blend ---- */
.esm-logo-img {
  mix-blend-mode: screen;
  user-select: none;
  -webkit-user-select: none;
}

/* ---- Selection ---- */
::selection {
  background-color: var(--esm-cyan);
  color: var(--esm-void);
}

/* ---- Focus ---- */
:focus-visible {
  outline: 2px solid var(--esm-cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Smooth scroll ---- */
html { scroll-behavior: smooth; }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .esm-fade-up { transition: none; opacity: 1; transform: none; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}

/* ---- WordPress core alignment ---- */
.alignnone { margin: 0; }
.aligncenter { display: block; margin: 0 auto; }
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute; width: 1px; word-wrap: normal !important;
}

/* ---- Hero Animations ---- */
.esm-scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 50%, rgba(0, 221, 245, 0.04) 51%, transparent 52%);
  background-size: 100% 8px;
  opacity: 0.7;
}

@keyframes esmSubtleZoom {
  0% { transform: scale(1.02); }
  50% { transform: scale(1.07); }
  100% { transform: scale(1.02); }
}

.animate-subtle-zoom {
  animation: esmSubtleZoom 18s ease-in-out infinite alternate;
  transform-origin: center center;
}

/* ---- Hide Scrollbar Utility ---- */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}