/*
Theme Name: PROESFERA
Theme URI: https://proesfera.com
Author: PROESFERA
Author URI: https://proesfera.com
Description: Tema corporatiu de PROESFERA — Efficiency Management Projects. Disseny dark tech premium amb paleta Fibonacci (Verde #15E990, Magenta #E90590, Cyan #15E9E9).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: proesfera
Tags: dark, corporate, energy, one-page, responsive, custom-colors, custom-logo, full-width-template
*/

/* === VARIABLES === */
:root {
  --bg: #080b12;
  --bg2: #0d1120;
  --bg3: #111828;
  --green: #15E990;
  --magenta: #E90590;
  --cyan: #15E9E9;
  --text: #e8eaf0;
  --text-dim: rgba(232,234,240,0.5);
  --text-dimmer: rgba(232,234,240,0.25);
  --border: rgba(255,255,255,0.07);
  --card-bg: rgba(255,255,255,0.04);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--cyan); }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--green); border-radius: 2px; }

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
}
h1 { font-size: clamp(42px, 6vw, 80px); font-weight: 800; }
h2 { font-size: clamp(28px, 3.5vw, 44px); }
h3 { font-size: clamp(18px, 2vw, 24px); }
p { color: var(--text-dim); font-weight: 300; line-height: 1.7; }

/* === LAYOUT === */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}
.site-main { padding-top: 72px; }
section { padding: 100px 48px; }

/* === BUTTONS === */
.btn-primary {
  display: inline-flex; align-items: center;
  padding: 14px 32px; background: var(--green); color: #080b12;
  font-size: 14px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; border-radius: 4px;
  text-decoration: none; transition: opacity 0.2s, transform 0.2s;
  border: none; cursor: pointer; font-family: var(--font-body);
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); color: #080b12; }
.btn-outline {
  display: inline-flex; align-items: center;
  padding: 14px 32px; background: transparent;
  border: 1px solid rgba(255,255,255,0.2); color: var(--text);
  font-size: 14px; font-weight: 500; letter-spacing: 0.05em;
  text-transform: uppercase; border-radius: 4px;
  text-decoration: none; transition: border-color 0.2s, color 0.2s;
  font-family: var(--font-body);
}
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); }

/* === ENERGY LINE DIVIDER === */
.energy-line {
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--green) 30%, var(--magenta) 50%, var(--cyan) 70%, transparent 100%);
  opacity: 0.3;
}

/* === SECTION LABELS === */
.section-label {
  font-size: 11px; font-weight: 500; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--green); margin-bottom: 16px;
  display: block;
}
.section-title { color: #fff; max-width: 640px; text-wrap: pretty; }
.section-title span { color: var(--green); }
.section-header { margin-bottom: 64px; }
.section-header-row {
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 32px; flex-wrap: wrap;
  margin-bottom: 64px;
}
.section-desc {
  font-size: 16px; font-weight: 300; color: var(--text-dim);
  max-width: 420px; line-height: 1.7; margin-top: 16px;
}

/* === NAV === */
#site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px; height: 72px;
  background: rgba(8,11,18,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
#site-header.scrolled { background: rgba(8,11,18,0.97); }
.site-branding { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.site-title-text {
  font-family: var(--font-display); font-weight: 800;
  font-size: 20px; letter-spacing: -0.02em; color: #fff;
}
.site-title-text span { color: var(--green); }
.main-navigation { display: flex; align-items: center; }
.main-navigation ul { display: flex; gap: 36px; list-style: none; margin: 0; padding: 0; }
.main-navigation ul li a {
  font-size: 13px; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-dim);
  text-decoration: none; transition: color 0.2s;
}
.main-navigation ul li a:hover { color: var(--green); }
.nav-right { display: flex; align-items: center; gap: 24px; }
.lang-switcher { display: flex; gap: 6px; }
.lang-btn {
  font-size: 11px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 4px 8px; border-radius: 3px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-dim); cursor: pointer; transition: all 0.2s;
}
.lang-btn.active, .lang-btn:hover {
  border-color: var(--green); color: var(--green);
  background: rgba(21,233,144,0.06);
}
.nav-cta {
  padding: 9px 22px; border-radius: 4px;
  background: var(--green); color: #080b12;
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
  text-decoration: none; text-transform: uppercase;
  transition: opacity 0.2s; font-family: var(--font-body);
}
.nav-cta:hover { opacity: 0.85; color: #080b12; }

/* === HERO === */
.hero-section {
  min-height: 100vh; display: grid; place-items: center;
  padding: 120px 48px 80px; position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 50%, rgba(21,233,233,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 20% 60%, rgba(21,233,144,0.06) 0%, transparent 65%);
}
.hero-grid-lines {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}
.hero-content {
  position: relative; z-index: 1; max-width: 900px;
  text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 32px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--green);
  border: 1px solid rgba(21,233,144,0.3);
  padding: 6px 16px; border-radius: 20px;
  background: rgba(21,233,144,0.05);
}
.hero-eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}
.hero-title { color: #fff; }
.hero-title .accent { color: var(--green); }
.hero-title .accent2 { color: var(--cyan); }
.hero-subtitle {
  font-size: clamp(16px, 1.8vw, 20px); font-weight: 300;
  color: var(--text-dim); max-width: 580px; line-height: 1.7;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.hero-stats {
  display: flex; gap: 48px; padding-top: 16px;
  border-top: 1px solid var(--border); width: 100%; justify-content: center;
}
.hero-stat { text-align: center; }
.hero-stat-num {
  font-family: var(--font-display); font-weight: 700;
  font-size: 32px; color: var(--green); letter-spacing: -0.02em;
}
.hero-stat-label {
  font-size: 11px; font-weight: 400; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dimmer); margin-top: 2px;
}
.scroll-indicator {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 1;
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--green), transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  100% { transform: scaleY(1); transform-origin: bottom; opacity: 0; }
}
.scroll-text {
  font-size: 10px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text-dimmer);
}

/* === SERVICES === */
.services-section { background: var(--bg2); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2px;
}
.service-card {
  background: var(--card-bg); border: 1px solid var(--border);
  padding: 40px 36px; position: relative; overflow: hidden;
  transition: border-color 0.3s, background 0.3s; cursor: default;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--green), var(--magenta), var(--cyan));
  opacity: 0; transition: opacity 0.3s;
}
.service-card:hover { border-color: rgba(21,233,144,0.25); background: rgba(21,233,144,0.04); }
.service-card:hover::before { opacity: 1; }
.service-icon { width: 48px; height: 48px; margin-bottom: 24px; }
.service-icon svg { width: 36px; height: 36px; }
.service-name {
  font-family: var(--font-display); font-weight: 700;
  font-size: 18px; color: #fff; margin-bottom: 12px;
}
.service-desc { font-size: 14px; font-weight: 300; color: var(--text-dim); line-height: 1.65; }
.service-num {
  position: absolute; top: 28px; right: 32px;
  font-family: var(--font-display); font-weight: 800;
  font-size: 48px; color: rgba(255,255,255,0.04); letter-spacing: -0.04em;
}

/* === PROJECTS === */
.projects-section { background: var(--bg); }
.projects-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px;
}
.project-card {
  position: relative; overflow: hidden;
  aspect-ratio: 4/3; background: var(--bg3);
  border: 1px solid var(--border); cursor: pointer;
}
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.project-card:hover img { transform: scale(1.04); }
.project-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.project-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,11,18,0.92) 0%, rgba(8,11,18,0.2) 60%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 28px; opacity: 0; transition: opacity 0.3s;
}
.project-card:hover .project-overlay { opacity: 1; }
.project-bottom { padding: 20px 24px; }
.project-cat {
  font-size: 10px; font-weight: 500; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--green); margin-bottom: 6px;
}
.project-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 16px; color: #fff; letter-spacing: -0.01em;
}
.project-overlay-arrow {
  position: absolute; top: 20px; right: 20px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--green); display: flex; align-items: center; justify-content: center;
}

/* === WHY US === */
.why-section { background: var(--bg2); }
.why-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
}
.why-list { display: flex; flex-direction: column; gap: 0; }
.why-item {
  display: flex; gap: 24px; padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.why-item:first-child { border-top: 1px solid var(--border); }
.why-num {
  font-family: var(--font-display); font-weight: 800;
  font-size: 13px; color: var(--green); letter-spacing: 0.1em;
  min-width: 32px; padding-top: 3px;
}
.why-item-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 17px; color: #fff; margin-bottom: 8px;
}
.why-item-desc { font-size: 14px; font-weight: 300; color: var(--text-dim); line-height: 1.6; }
.why-visual {
  position: relative; display: flex; align-items: center; justify-content: center;
}
.why-circle-outer {
  width: 340px; height: 340px; border-radius: 50%;
  border: 1px solid rgba(21,233,144,0.15);
  display: flex; align-items: center; justify-content: center;
  position: relative; animation: rotateSlow 30s linear infinite;
}
@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.why-circle-inner {
  width: 220px; height: 220px; border-radius: 50%;
  border: 1px solid rgba(21,233,233,0.2);
  display: flex; align-items: center; justify-content: center;
  animation: rotateSlow 18s linear infinite reverse;
}
.why-circle-core {
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(21,233,144,0.4), rgba(21,233,233,0.1));
  border: 1px solid rgba(21,233,144,0.4);
  display: flex; align-items: center; justify-content: center;
}
.why-orbit-dot {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
}

/* === ABOUT === */
.about-section { background: var(--bg); }
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: start;
}
.about-text { display: flex; flex-direction: column; gap: 24px; }
.about-body {
  font-size: 16px; font-weight: 300; color: var(--text-dim); line-height: 1.75;
}
.about-body strong { color: var(--text); font-weight: 500; }
.about-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--green);
  text-decoration: none; border-bottom: 1px solid rgba(21,233,144,0.3);
  padding-bottom: 2px; transition: border-color 0.2s;
}
.about-link:hover { border-color: var(--green); }
.about-side { display: flex; flex-direction: column; gap: 24px; }
.about-card {
  background: var(--card-bg); border: 1px solid var(--border);
  padding: 28px 32px; border-radius: 2px;
}
.about-card-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 15px; color: #fff; margin-bottom: 10px;
}
.about-card-text { font-size: 14px; font-weight: 300; color: var(--text-dim); line-height: 1.6; }

/* === CLIENTS === */
.clients-section { background: var(--bg2); padding-top: 72px; padding-bottom: 72px; }
.clients-row { display: flex; flex-wrap: wrap; gap: 2px; }
.client-card {
  flex: 1 1 160px; min-width: 140px; height: 80px;
  background: var(--card-bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-dimmer);
  transition: color 0.2s, border-color 0.2s;
}
.client-card:hover { color: var(--text-dim); border-color: rgba(255,255,255,0.12); }
.client-card img { max-height: 36px; width: auto; filter: brightness(0) invert(0.4); transition: filter 0.2s; }
.client-card:hover img { filter: brightness(0) invert(0.8); }

/* === NEWS === */
.news-section { background: var(--bg); }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.news-card {
  background: var(--card-bg); border: 1px solid var(--border);
  overflow: hidden; transition: border-color 0.3s;
}
.news-card:hover { border-color: rgba(21,233,144,0.2); }
.news-card-img {
  aspect-ratio: 16/9; background: var(--bg3);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.news-card:hover .news-card-img img { transform: scale(1.04); }
.news-card-body { padding: 24px 28px; }
.news-date {
  font-size: 11px; font-weight: 400; letter-spacing: 0.1em;
  color: var(--text-dimmer); text-transform: uppercase; margin-bottom: 10px;
}
.news-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 16px; color: #fff; line-height: 1.3;
  margin-bottom: 12px;
}
.news-excerpt { font-size: 13px; font-weight: 300; color: var(--text-dim); line-height: 1.6; }
.news-read-more {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--green);
  text-decoration: none; margin-top: 16px;
}

/* === CONTACT === */
.contact-section { background: var(--bg2); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 80px; }
.contact-info { display: flex; flex-direction: column; gap: 32px; }
.contact-item { display: flex; flex-direction: column; gap: 4px; }
.contact-label {
  font-size: 10px; font-weight: 500; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--green);
}
.contact-value { font-size: 15px; font-weight: 400; color: var(--text); }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label {
  font-size: 11px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-dim);
}
.form-field input, .form-field textarea, .form-field select {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  color: var(--text); font-family: var(--font-body);
  font-size: 14px; padding: 12px 16px; border-radius: 3px;
  outline: none; transition: border-color 0.2s; width: 100%;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  border-color: rgba(21,233,144,0.4);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field select option { background: #0d1120; }
.form-submit {
  padding: 14px 32px; background: var(--green); color: #080b12;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; border: none; border-radius: 4px;
  cursor: pointer; transition: opacity 0.2s; align-self: flex-start;
}
.form-submit:hover { opacity: 0.85; }

/* === FOOTER === */
#colophon {
  background: var(--bg); border-top: 1px solid var(--border);
  padding: 48px 48px 32px;
}
.footer-top {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 48px; flex-wrap: wrap;
  padding-bottom: 40px; border-bottom: 1px solid var(--border);
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-tagline {
  font-size: 13px; font-weight: 300; color: var(--text-dimmer);
  max-width: 240px; line-height: 1.6;
}
.footer-nav-col { display: flex; flex-direction: column; gap: 8px; }
.footer-nav-title {
  font-size: 10px; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px;
}
.footer-nav-col a {
  font-size: 13px; font-weight: 300; color: var(--text-dimmer);
  text-decoration: none; transition: color 0.2s;
}
.footer-nav-col a:hover { color: var(--green); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px; padding-top: 28px;
}
.footer-copy { font-size: 12px; font-weight: 300; color: var(--text-dimmer); }
.footer-social { display: flex; gap: 16px; }
.footer-social a {
  font-size: 12px; font-weight: 400; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-dimmer);
  text-decoration: none; transition: color 0.2s;
}
.footer-social a:hover { color: var(--green); }

/* === WORDPRESS CORE === */
.wp-block-image { margin: 2em 0; }
.aligncenter { text-align: center; }
.alignleft { float: left; margin-right: 1.5em; }
.alignright { float: right; margin-left: 1.5em; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  #site-header { padding: 0 24px; }
  .main-navigation { display: none; }
  section { padding: 72px 24px; }
  .hero-section { padding: 100px 24px 60px; }
  .why-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .why-visual { display: none; }
  .hero-stats { gap: 24px; }
  #colophon { padding: 40px 24px 24px; }
}
@media (max-width: 600px) {
  .projects-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .services-grid { grid-template-columns: 1fr; }
}
