/* ElysiumX Calligraphy Showcase - Fully Responsive */
.elysiumx-calligraphy {
  --primary-font: "Dancing Script", cursive;
  --secondary-font: "Playfair Display", serif;
  --text-color: #000;
  --text-muted: rgba(0, 0, 0, 0.7);
  --transition-speed: 0.4s;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  background: #fff;
  color: var(--text-color);
  min-height: 100vh;
  padding: 1rem;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* Base Typography */
.elysiumx-calligraphy h1,
.elysiumx-calligraphy h2,
.elysiumx-calligraphy h3 {
  font-weight: 400;
  margin: 0 0 1rem;
  line-height: 1.3;
}

/* Hero Section */
.ec-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1rem;
  text-align: center;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ec-logo-mark {
  font-family: var(--secondary-font);
  font-size: clamp(0.9rem, 3vw, 1.2rem);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 2rem;
  opacity: 0.7;
}

.ec-title {
  font-family: var(--primary-font);
  font-size: clamp(2rem, 10vw, 4.5rem);
  margin: 0 auto 1rem;
  max-width: 90%;
}

.ec-line {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  margin: 0 auto;
  animation: typing 3.5s steps(40, end) forwards,
    blink-caret 0.75s step-end infinite;
  border-right: 2px solid var(--text-color);
  width: 0;
}

.ec-line:nth-child(1) {
  animation-delay: 0.5s;
}
.ec-line:nth-child(2) {
  animation-delay: 2s;
}

/* Philosophy Section */
.ec-philosophy {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.ec-quote-container {
  text-align: center;
  margin-bottom: 3rem;
}

.ec-quote {
  font-family: var(--primary-font);
  font-size: clamp(1.5rem, 6vw, 2.5rem);
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeIn 1s ease-out forwards;
  animation-delay: 4s;
}

.ec-company {
  font-family: var(--secondary-font);
  font-size: clamp(0.8rem, 2.5vw, 1rem);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeIn 1s ease-out forwards;
  animation-delay: 4.5s;
}

.ec-principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.ec-principle {
  padding: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out forwards;
}

.ec-principle:nth-child(1) {
  animation-delay: 5s;
}
.ec-principle:nth-child(2) {
  animation-delay: 5.3s;
}
.ec-principle:nth-child(3) {
  animation-delay: 5.6s;
}

.ec-principle-title {
  font-family: var(--secondary-font);
  font-size: clamp(1.1rem, 4vw, 1.3rem);
  margin-bottom: 0.8rem;
}

.ec-principle-desc {
  font-size: clamp(0.9rem, 3vw, 1rem);
  line-height: 1.6;
  color: var(--text-muted);
}

/* Animations */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
    border-right-color: transparent;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: var(--text-color);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* iPhone 12 Specific Adjustments */
@media only screen and (device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) {
  .ec-hero {
    min-height: 50vh;
    padding: 2rem 1rem;
  }

  .ec-title {
    font-size: 2.8rem;
  }

  .ec-line {
    animation-duration: 2.8s;
  }
}

/* Tablet and Larger Mobile */
@media (min-width: 768px) {
  .elysiumx-calligraphy {
    padding: 2rem;
  }

  .ec-principles {
    gap: 2rem;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .ec-hero {
    padding: 5rem 2rem;
  }

  .ec-philosophy {
    padding: 4rem 2rem;
  }
}

/* Orientation Adjustments */
@media screen and (max-height: 500px) {
  .ec-hero {
    min-height: 80vh;
  }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  .ec-line,
  .ec-quote,
  .ec-company,
  .ec-principle {
    animation: none !important;
    opacity: 1;
    transform: none;
    border-right: none;
    width: auto;
  }
}
