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

:root {
  /* SolarLeder exact brand colors */
  --sl-primary:   #69D4A4;
  --sl-secondary: #4FC48F;
  --sl-dark:      #2b9b6f;
  --sl-deep:      #1e6b45;
  --sl-sun:       #fff176;
  --sl-sun-warm:  #ffd54f;

  /* Backgrounds */
  --bg-1: #07150f;
  --bg-2: #0d1f17;
  --bg-3: #111f19;

  /* Card */
  --card-bg:    #ffffff;
  --card-back:  linear-gradient(155deg, #0d2218 0%, #071410 100%);

  /* Text */
  --tx-h:    #0a1f14;
  --tx-b:    #1a3d2a;
  --tx-m:    #4a7060;
  --tx-lt:   #8aab9a;

  /* UI */
  --border:  rgba(105,212,164,0.15);
  --shadow:  0 32px 80px rgba(0,0,0,0.55), 0 8px 24px rgba(0,0,0,0.25);
  --r-card:  22px;
  --r-item:  14px;
  --ease:    cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--bg-1);
  color: var(--tx-h);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 28px 16px 12px;
  overflow-x: hidden;
  position: relative;
}

/* ─── Solar Background Scene ──────────────────────────── */
.bg-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, #0d2a1c 0%, var(--bg-1) 70%);
}

/* Sun core */
.sun-core {
  position: absolute;
  top: -140px; left: 50%;
  transform: translateX(-50%);
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%,
    #fffde7 0%, #fff176 18%, #69D4A4 45%, #2b9b6f 70%, transparent 100%);
  filter: blur(8px);
  opacity: 0.22;
  animation: sunPulse 8s ease-in-out infinite;
}

.sun-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(105,212,164,0.12);
  animation: ringExpand 10s linear infinite;
}
.ring-1 { width: 320px; height: 320px; top: -20px; animation-delay: 0s; }
.ring-2 { width: 500px; height: 500px; top: -20px; animation-delay: -3s; opacity: 0.7; }
.ring-3 { width: 700px; height: 700px; top: -20px; animation-delay: -6s; opacity: 0.4; }

/* Sun rays */
.ray {
  position: absolute;
  top: -10px; left: 50%;
  width: 1px; height: 200px;
  transform-origin: top center;
  transform: translateX(-50%) rotate(var(--a));
  background: linear-gradient(to bottom, rgba(105,212,164,0.18), transparent);
  animation: rayPulse 6s ease-in-out infinite;
}

/* Floating particles */
.particle {
  position: absolute;
  left: var(--x); top: var(--y);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--sl-primary);
  opacity: 0;
  animation: floatUp var(--d) ease-in-out infinite;
  box-shadow: 0 0 6px var(--sl-primary);
}

@keyframes sunPulse {
  0%, 100% { opacity: 0.22; transform: translateX(-50%) scale(1); }
  50%       { opacity: 0.30; transform: translateX(-50%) scale(1.06); }
}
@keyframes ringExpand {
  from { opacity: 0.3; }
  50%  { opacity: 0.12; }
  to   { opacity: 0.3; }
}
@keyframes rayPulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 0.2; }
}
@keyframes floatUp {
  0%   { opacity: 0; transform: translateY(0) scale(0.5); }
  20%  { opacity: 0.8; }
  80%  { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-60px) scale(1.2); }
}

/* ─── Card Container ──────────────────────────────────── */
.card-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: riseUp 0.7s var(--ease) both;
}

@keyframes riseUp {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Flip Card ───────────────────────────────────────── */
.flip-card { perspective: 1400px; }

.flip-inner {
  position: relative;
  width: 100%;
  transition: transform 0.72s var(--ease);
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-inner { transform: rotateY(180deg); }

.flip-front, .flip-back {
  width: 100%;
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* ═══════════ FRONT ═══════════ */
.flip-front {
  background: var(--card-bg);
  padding-bottom: 20px;
}

/* Header */
.card-header {
  background: linear-gradient(145deg, #07150f 0%, #0d2a1a 45%, #1a4a2d 100%);
  padding: 28px 24px 36px;
  position: relative;
  overflow: hidden;
}

.card-header::after {
  content: '';
  position: absolute;
  bottom: -20px; left: -20px; right: -20px;
  height: 44px;
  background: var(--card-bg);
  border-radius: 50%;
}

/* Subtle grid texture */
.card-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(105,212,164,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105,212,164,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
}

.header-glow {
  position: absolute;
  top: -60px; right: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(105,212,164,0.25), transparent 70%);
  pointer-events: none;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.solar-logo-mark svg {
  width: 62px; height: 62px;
  filter: drop-shadow(0 4px 16px rgba(105,212,164,0.4));
  animation: logoGlow 4s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% { filter: drop-shadow(0 4px 16px rgba(105,212,164,0.4)); }
  50%       { filter: drop-shadow(0 4px 28px rgba(105,212,164,0.7)); }
}

.brand-name-block {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-solar {
  font-size: 2rem;
  font-weight: 800;
  color: var(--sl-primary);
  letter-spacing: -1px;
}
.brand-leder {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -1px;
  margin-left: 0;
}
.brand-tagline {
  font-size: 0.65rem;
  font-weight: 400;
  color: rgba(105,212,164,0.65);
  letter-spacing: 0.3px;
  margin-top: 3px;
}

/* Parent badge */
.parent-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 5px 12px;
  border-radius: 50px;
  background: rgba(105,212,164,0.1);
  border: 1px solid rgba(105,212,164,0.25);
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(105,212,164,0.8);
  position: relative;
  z-index: 1;
  letter-spacing: 0.3px;
}

.synergy-mini-icon { width: 14px; height: 14px; }

/* ─── Profile ──────────────────────────────────────────── */
.profile-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 24px 4px;
  gap: 3px;
}

.person-prefix {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--sl-secondary);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.person-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--tx-h);
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin: 2px 0 4px;
}

.person-role {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--tx-m);
}

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 50px;
  background: rgba(105,212,164,0.1);
  border: 1px solid rgba(105,212,164,0.3);
  font-size: 0.67rem;
  font-weight: 600;
  color: var(--sl-dark);
}

.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sl-primary);
  animation: blink 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ─── Divider ──────────────────────────────────────────── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px 4px;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(105,212,164,0.3), transparent);
}

.divider-icon {
  font-size: 1rem;
  color: var(--sl-primary);
  line-height: 1;
}

/* ─── Contact Rows ─────────────────────────────────────── */
.contacts {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 16px 0;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 14px;
  border-radius: var(--r-item);
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(105,212,164,0.1);
  background: rgba(105,212,164,0.03);
  transition: all 0.28s var(--ease);
  position: relative;
  overflow: hidden;
}

.contact-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 2px 0 0 2px;
  background: linear-gradient(to bottom, var(--sl-primary), var(--sl-secondary));
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.25s var(--ease);
}

.contact-row:hover {
  background: rgba(105,212,164,0.08);
  border-color: rgba(105,212,164,0.3);
  transform: translateX(5px);
  box-shadow: 0 4px 18px rgba(105,212,164,0.1);
}

.contact-row:hover::before { transform: scaleY(1); }

/* Icon cells */
.ci {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ci svg { width: 17px; height: 17px; }

.ci.phone    { background: rgba(105,212,164,0.12); color: var(--sl-dark); }
.ci.whatsapp { background: rgba(37,211,102,0.12);  color: #1a8a45; }
.ci.email    { background: rgba(105,212,164,0.12); color: var(--sl-dark); }
.ci.website  { background: rgba(79,196,143,0.15);  color: var(--sl-secondary); }
.ci.location { background: rgba(105,212,164,0.1);  color: var(--sl-dark); }

.ct { flex: 1; display: flex; flex-direction: column; gap: 1px; overflow: hidden; }

.cl {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--sl-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.cv {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--tx-b);
  line-height: 1.35;
}

.ca {
  color: var(--sl-primary);
  font-size: 0.95rem;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateX(-4px);
}

.contact-row:hover .ca {
  opacity: 1;
  transform: translateX(0);
}

/* ─── Service Strip ────────────────────────────────────── */
.service-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 16px 16px 0;
  padding: 10px 16px;
  border-radius: 50px;
  background: linear-gradient(135deg, rgba(105,212,164,0.08), rgba(79,196,143,0.12));
  border: 1px solid rgba(105,212,164,0.2);
}

.service-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--sl-dark);
  white-space: nowrap;
}

.service-sep {
  color: rgba(105,212,164,0.4);
  font-weight: 700;
}

/* ─── CTA Bar ──────────────────────────────────────────── */
.cta-bar {
  display: flex;
  gap: 10px;
  padding: 14px 16px 0;
}

.btn-save, .btn-flip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 16px;
  border-radius: var(--r-item);
  font-family: 'Poppins', sans-serif;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.28s var(--ease);
  border: none;
  letter-spacing: 0.2px;
}

.btn-save {
  background: linear-gradient(135deg, var(--sl-primary), var(--sl-secondary));
  color: #fff;
  box-shadow: 0 4px 16px rgba(105,212,164,0.35);
}

.btn-save svg { width: 16px; height: 16px; }

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(105,212,164,0.5);
}

.btn-flip {
  background: var(--tx-h);
  color: var(--sl-primary);
  border: 1.5px solid rgba(105,212,164,0.3);
}

.btn-flip svg { width: 15px; height: 15px; }

.btn-flip:hover {
  background: #0d2a1a;
  border-color: var(--sl-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(105,212,164,0.2);
}

/* ═══════════ BACK ═══════════ */
.flip-back {
  background: linear-gradient(155deg, #0b2318 0%, #060f0a 100%);
  transform: rotateY(180deg);
  position: absolute;
  top: 0; left: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 20px 22px;
  min-height: 100%;
  border: 1px solid rgba(105,212,164,0.12);
}

/* Back grid texture */
.flip-back::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(105,212,164,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105,212,164,0.04) 1px, transparent 1px);
  background-size: 30px 30px;
  border-radius: var(--r-card);
  pointer-events: none;
}

.back-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  position: relative;
}

.back-sun-badge svg {
  width: 56px; height: 56px;
  filter: drop-shadow(0 4px 14px rgba(105,212,164,0.5));
  animation: logoGlow 4s ease-in-out infinite;
}

.back-brand-name {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
}
.back-solar  { color: var(--sl-primary); }
.back-leder  { color: #ffffff; }

.back-tagline {
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(105,212,164,0.7);
  letter-spacing: 0.3px;
}

.back-desc {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.5;
}

/* Stats */
.stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 14px;
  border-radius: var(--r-item);
  background: rgba(105,212,164,0.07);
  border: 1px solid rgba(105,212,164,0.15);
}

.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-n {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--sl-primary);
  line-height: 1;
}

.stat-l {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.4);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-div {
  width: 1px; height: 32px;
  background: rgba(105,212,164,0.2);
  margin: 0 6px;
}

/* Back sections */
.back-section { display: flex; flex-direction: column; gap: 8px; }

.back-sect-title {
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(105,212,164,0.5);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.back-links { display: flex; flex-direction: column; gap: 6px; }

.back-link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-item);
  background: rgba(105,212,164,0.06);
  border: 1px solid rgba(105,212,164,0.12);
  text-decoration: none;
  color: #fff;
  transition: all 0.25s var(--ease);
}

.back-link-row:hover {
  background: rgba(105,212,164,0.13);
  border-color: rgba(105,212,164,0.3);
  transform: translateX(4px);
}

.primary-parent {
  background: rgba(105,212,164,0.1);
  border-color: rgba(105,212,164,0.25);
}

.bl-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(105,212,164,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.synergy-icon svg { width: 24px; height: 24px; }

.bl-info { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.bl-name { font-weight: 600; font-size: 0.88rem; color: rgba(255,255,255,0.95); }
.bl-url  { font-size: 0.68rem; color: rgba(105,212,164,0.55); }

.bl-arr {
  color: var(--sl-primary);
  font-size: 0.9rem;
  opacity: 0.6;
}

.back-link-row:hover .bl-arr { opacity: 1; }

/* Flags */
.flags-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.flag-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 50px;
  background: rgba(105,212,164,0.07);
  border: 1px solid rgba(105,212,164,0.15);
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  transition: all 0.2s ease;
}

.flag-chip:hover {
  background: rgba(105,212,164,0.14);
  border-color: rgba(105,212,164,0.3);
}

/* Back button */
.btn-flip.back-btn {
  background: rgba(105,212,164,0.1);
  color: var(--sl-primary);
  border: 1px solid rgba(105,212,164,0.25);
  margin-top: 4px;
}

.btn-flip.back-btn:hover {
  background: rgba(105,212,164,0.18);
  border-color: var(--sl-primary);
}

/* ─── Footer ───────────────────────────────────────────── */
.page-footer {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  padding-bottom: 18px;
  font-size: 0.68rem;
  color: rgba(105,212,164,0.35);
  text-align: center;
  letter-spacing: 0.3px;
}

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 480px) {
  body { padding: 18px 12px 10px; }

  .card-header { padding: 22px 18px 34px; }
  .brand-solar, .brand-leder { font-size: 1.75rem; }
  .solar-logo-mark svg { width: 54px; height: 54px; }

  .profile-area { padding: 18px 18px 4px; gap: 14px; }
  .person-name { font-size: 1.35rem; }
  .avatar { width: 68px; height: 68px; }
  .avatar-svg { width: 54px; height: 54px; }

  .contacts { padding: 8px 12px 0; }
  .contact-row { padding: 10px 12px; }
  .ci { width: 34px; height: 34px; }
  .cv { font-size: 0.8rem; }

  .service-strip { gap: 7px; padding: 8px 12px; }
  .service-item { font-size: 0.62rem; }

  .cta-bar { padding: 12px 12px 0; }
  .btn-save, .btn-flip { font-size: 0.78rem; padding: 11px 10px; }

  .back-brand-name { font-size: 1.55rem; }
}

@media (max-width: 360px) {
  .brand-solar, .brand-leder { font-size: 1.5rem; }
  .service-strip { flex-wrap: wrap; border-radius: 14px; }
  .flags-row { gap: 6px; }
  .flag-chip { font-size: 0.66rem; padding: 5px 10px; }
}

/* ─── Entrance animations ──────────────────────────────── */
.contact-row {
  animation: rowIn 0.45s var(--ease) both;
}
.contact-row:nth-child(1) { animation-delay: 0.08s; }
.contact-row:nth-child(2) { animation-delay: 0.14s; }
.contact-row:nth-child(3) { animation-delay: 0.20s; }
.contact-row:nth-child(4) { animation-delay: 0.26s; }
.contact-row:nth-child(5) { animation-delay: 0.32s; }

@keyframes rowIn {
  from { opacity: 0; transform: translateX(-14px); }
  to   { opacity: 1; transform: translateX(0); }
}
