/* ==========================================================================
   FaiCreative.SA // 3D Printing Coming Soon Styles (Arabic & RTL Optimized)
   ========================================================================== */

:root {
  --bg-dark: #0a0d14;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Cairo", "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  
  /* Dynamic Filament Palette (defaults to Coral) */
  --accent-color: #ff477e;
  --accent-glow: rgba(255, 71, 126, 0.35);
  --accent-secondary: #ff758f;
  --whatsapp-color: #25D366;
  --whatsapp-hover: #20bd5a;
  --success-color: #10b981;
  --warning-color: #f59e0b;
}

/* Filament Theme Switcher Variants */
body[data-filament="coral"] {
  --accent-color: #ff477e;
  --accent-glow: rgba(255, 71, 126, 0.35);
  --accent-secondary: #ff758f;
}

body[data-filament="neon"] {
  --accent-color: #10b981;
  --accent-glow: rgba(168, 85, 247, 0.35);
  --accent-secondary: #34d399;
}

body[data-filament="cyan"] {
  --accent-color: #06b6d4;
  --accent-glow: rgba(6, 182, 212, 0.35);
  --accent-secondary: #38bdf8;
}

body[data-filament="gold"] {
  --accent-color: #f59e0b;
  --accent-glow: rgba(245, 158, 11, 0.35);
  --accent-secondary: #fbbf24;
}

body[data-filament="purple"] {
  --accent-color: #a855f7;
  --accent-glow: rgba(168, 85, 247, 0.35);
  --accent-secondary: #c084fc;
}

/* Base Reset & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-family);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Layer Lines Texture Background */
.layer-lines-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.015) 0px,
    rgba(255, 255, 255, 0.015) 1px,
    transparent 1px,
    transparent 4px
  ),
  radial-gradient(ellipse 80% 50% at 50% -10%, var(--accent-glow), transparent 70%);
  transition: background 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Announcement Ribbon */
.announcement-bar {
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--bg-card-border);
  font-size: 0.85rem;
  padding: 0.65rem 1rem;
  text-align: center;
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 10;
}

.announcement-content {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
}

.announcement-content strong {
  color: var(--text-primary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 0 10px var(--accent-color);
  flex-shrink: 0;
}

.status-dot.pulsing {
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  border-bottom: 1px solid var(--bg-card-border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  direction: ltr;
  text-align: right;
}

.brand-tld {
  color: var(--accent-color);
  transition: color 0.4s ease;
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* 3D Calibration Cube */
.brand-cube {
  width: 32px;
  height: 32px;
  position: relative;
  transform-style: preserve-3d;
  animation: rotateCube 12s linear infinite;
  flex-shrink: 0;
}

@keyframes rotateCube {
  0% { transform: rotateX(-20deg) rotateY(0deg); }
  100% { transform: rotateX(-20deg) rotateY(360deg); }
}

.cube-face {
  position: absolute;
  width: 32px;
  height: 32px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  font-weight: 800;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 6px var(--accent-glow);
  transition: border-color 0.4s ease, color 0.4s ease;
}

.cube-face.front  { transform: rotateY(0deg) translateZ(16px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(16px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(16px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(16px); }
.cube-face.top    { transform: rotateX(90deg) translateZ(16px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(16px); }

/* Filament Switcher */
.filament-picker-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid var(--bg-card-border);
}

.filament-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.filament-palette {
  display: flex;
  gap: 0.45rem;
}

.spool-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  background-color: var(--swatch);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.spool-btn:hover {
  transform: scale(1.2);
}

.spool-btn.active {
  border-color: #fff;
  transform: scale(1.25);
  box-shadow: 0 0 8px var(--swatch);
}

/* Hero Section */
.hero-container {
  padding: 3.5rem 0 2rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2rem, 5.2vw, 3.8rem);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 1.25rem;
}

.extruded-text {
  color: var(--accent-color);
  text-shadow: 0 0 25px var(--accent-glow);
  position: relative;
  display: inline-block;
  transition: color 0.4s ease;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 3rem;
  font-weight: 400;
  line-height: 1.8;
}

.hero-subtitle strong {
  color: var(--text-primary);
}

/* 3D Printer Monitor / Dashboard */
.printer-monitor {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 18px;
  padding: 1.75rem;
  margin-bottom: 3.5rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  text-align: right;
}

.monitor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--bg-card-border);
  padding-bottom: 0.9rem;
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.terminal-dots {
  display: inline-flex;
  gap: 5px;
  margin-left: 0.5rem;
}

.terminal-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #334155;
}

.terminal-dots span:nth-child(1) { background: #ef4444; }
.terminal-dots span:nth-child(2) { background: #f59e0b; }
.terminal-dots span:nth-child(3) { background: #10b981; }

.monitor-status-pill {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success-color);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.75rem;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.stat-icon {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.stat-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 700;
}

.stat-val {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.text-success {
  color: var(--success-color);
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* Extrusion Track / Progress */
.extrusion-track-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.extrusion-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.extrusion-track {
  width: 100%;
  height: 14px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 9999px;
  overflow: visible;
  position: relative;
  border: 1px solid var(--bg-card-border);
}

.extrusion-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, var(--accent-color));
  border-radius: 9999px;
  position: relative;
  transition: width 0.4s ease;
  box-shadow: 0 0 12px var(--accent-glow);
}

.nozzle-head {
  position: absolute;
  right: -8px;
  top: -12px;
  width: 16px;
  height: 18px;
  background: #cbd5e1;
  border-radius: 3px 3px 6px 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  border: 1px solid #94a3b8;
}

.nozzle-tip {
  position: absolute;
  bottom: -4px;
  left: 5px;
  width: 6px;
  height: 4px;
  background: #e2e8f0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.extruded-filament-particle {
  position: absolute;
  bottom: -3px;
  left: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 0 6px var(--accent-color);
  animation: glow-drop 1s infinite alternate;
}

@keyframes glow-drop {
  from { opacity: 0.6; }
  to { opacity: 1; transform: scale(1.3); }
}

/* Call to Action Section (Focused on WhatsApp) */
.cta-section {
  margin-bottom: 4rem;
}

.cta-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--bg-card-border);
  border-radius: 20px;
  padding: 3rem 2rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.cta-header h3 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.cta-header p {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 2.25rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

.action-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* WhatsApp Button */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  background-color: var(--whatsapp-color);
  color: #fff;
  font-weight: 800;
  padding: 1.1rem 2.5rem;
  border-radius: 14px;
  text-decoration: none;
  font-size: 1.15rem;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.38);
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-whatsapp:hover {
  background-color: var(--whatsapp-hover);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 32px rgba(37, 211, 102, 0.5);
}

.whatsapp-icon {
  flex-shrink: 0;
}

.cta-micro-tip {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Sneak Peek Cards */
.sneak-peek-section {
  margin-bottom: 4rem;
}

.section-title {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.peek-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 18px;
  padding: 2rem 1.75rem;
  text-align: right;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.peek-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
}

.card-icon-wrap {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.peek-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
}

.peek-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.4rem;
}

.card-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-color);
  background: var(--accent-glow);
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
}

/* Easter Egg: Bed Leveler */
.easter-egg-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed var(--bg-card-border);
  border-radius: 18px;
  padding: 2rem;
  margin-bottom: 4rem;
}

.egg-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .egg-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: right;
  }
}

.egg-text h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.egg-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.bed-leveler-game {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.bed-graphic {
  width: 220px;
  height: 120px;
  border: 2px solid #334155;
  border-radius: 8px;
  position: relative;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.corner-indicator {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  padding: 2px 4px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
}

#cTL { top: 4px; left: 4px; }
#cTR { top: 4px; right: 4px; }
#cBL { bottom: 4px; left: 4px; }
#cBR { bottom: 4px; right: 4px; }

.bed-plate-visual {
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bed-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--bg-card-border);
  color: var(--text-primary);
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.9);
}

.btn-secondary:active {
  transform: scale(0.96);
}

.bed-status-msg {
  font-size: 0.8rem;
  color: var(--warning-color);
  font-weight: 600;
  text-align: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--bg-card-border);
  padding: 2.5rem 0 3rem;
  color: var(--text-muted);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    text-align: right;
  }
}

.footer-brand strong {
  color: var(--text-primary);
}

.footer-brand a {
  color: var(--accent-color);
  text-decoration: none;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #fff;
}

.bullet {
  color: var(--text-dim);
}

.footer-bottom {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .site-header {
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
  }
  .filament-picker-wrap {
    align-self: center;
  }
  .btn-whatsapp {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
  }
}
