/* ============================================
   Nicole Bedraoui · Human Design — Page Components
   (builds on style.css design system)
   ============================================ */

/* --- Language Toggle --- */
.lang-toggle {
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-taupe-dark);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  background: transparent;
  transition: all var(--transition);
}
.lang-toggle:hover {
  border-color: var(--color-taupe);
  background: var(--color-cream);
}

/* --- Hero --- */
.hero {
  min-height: calc(88vh - var(--nav-height));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: var(--space-4xl) 0;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-bg) 50%, var(--color-sand-light) 100%);
  z-index: 0;
}
.hero__bg::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(169, 177, 159, 0.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero__layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-4xl);
  align-items: center;
}
.hero__content { max-width: 560px; }
.hero__title { margin-bottom: var(--space-lg); }
.hero__title em { font-style: italic; color: var(--color-plum); }
.hero__subtitle {
  font-size: var(--font-size-md);
  color: var(--color-text-soft);
  line-height: 1.8;
  margin-bottom: var(--space-2xl);
  max-width: 480px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-md); }

/* Decorative bodygraph visual in hero */
.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__visual svg { width: 100%; max-width: 380px; height: auto; }
.hero__visual::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 8%;
  width: 110px;
  height: 110px;
  border: 1px solid var(--color-sand);
  border-radius: var(--radius-xl);
  z-index: -1;
}

@media (max-width: 968px) {
  .hero { min-height: 0; }
  .hero__layout { grid-template-columns: 1fr; gap: var(--space-2xl); text-align: center; }
  .hero__content { max-width: 100%; }
  .hero__subtitle { margin-left: auto; margin-right: auto; }
  .hero__actions { justify-content: center; }
  .hero__visual { display: none; }
}

/* --- Page hero (subpages) --- */
.page-hero {
  background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-bg) 60%, var(--color-sand-light) 100%);
  padding: var(--space-4xl) 0 var(--space-3xl);
  text-align: center;
}
.page-hero h1 { margin-bottom: var(--space-md); }
.page-hero p {
  color: var(--color-text-soft);
  font-size: var(--font-size-md);
  max-width: 560px;
  margin: 0 auto;
}

/* --- Feature items --- */
.feature {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}
.feature__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-cream);
  color: var(--color-taupe-dark);
}
.feature h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-sm);
}
.feature p {
  font-size: var(--font-size-sm);
  color: var(--color-text-soft);
  line-height: 1.7;
  margin-bottom: 0;
}

/* --- Steps --- */
.step__num {
  font-family: var(--font-serif);
  font-size: var(--font-size-2xl);
  color: var(--color-taupe);
  line-height: 1;
  margin-bottom: var(--space-md);
}

/* --- Offer Cards --- */
.offer-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  text-align: center;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}
.offer-card:hover {
  transform: translateY(var(--card-hover-lift));
  box-shadow: var(--card-hover-shadow);
}
.offer-card--featured {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}
.offer-card__badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: var(--color-white);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 5px 18px;
  border-radius: 999px;
}
.offer-card__tag {
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-taupe);
  margin-bottom: var(--space-sm);
}
.offer-card__title {
  font-family: var(--font-serif);
  font-size: var(--font-size-xl);
  color: var(--color-warm-dark);
  margin-bottom: var(--space-md);
}
.offer-card__desc {
  color: var(--color-text-soft);
  font-size: var(--font-size-sm);
  line-height: 1.7;
  margin: 0 auto var(--space-lg);
  max-width: 320px;
}
.offer-card__features {
  text-align: left;
  margin: 0 auto var(--space-xl);
  max-width: 300px;
}
.offer-card__features li {
  font-size: var(--font-size-sm);
  color: var(--color-text-soft);
  padding: 6px 0 6px 26px;
  position: relative;
  line-height: 1.6;
}
.offer-card__features li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 13px;
  width: 12px;
  height: 7px;
  border-left: 1.5px solid var(--color-copper);
  border-bottom: 1.5px solid var(--color-copper);
  transform: rotate(-45deg);
}
.offer-card__price {
  font-family: var(--font-serif);
  font-size: var(--font-size-2xl);
  font-weight: 600;
  color: var(--color-warm-dark);
  margin-bottom: var(--space-lg);
}
.offer-card .btn { margin-top: auto; }

/* --- CTA Banner --- */
.cta-banner {
  padding: var(--space-5xl) 0;
  background: var(--color-warm-dark);
  color: var(--color-white);
  text-align: center;
}
.cta-banner h2 { color: var(--color-white); margin-bottom: var(--space-md); }
.cta-banner p {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--font-size-md);
  max-width: 520px;
  margin: 0 auto var(--space-2xl);
}

/* --- About --- */
.about-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-3xl);
  align-items: start;
}
.about-photo {
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}
.about-photo img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}
.about-photo--placeholder {
  background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-sand-light) 100%);
  border: 1px solid var(--color-border-light);
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}
.about-text p {
  color: var(--color-text-soft);
  line-height: 1.85;
}
@media (max-width: 768px) {
  .about-layout { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; margin: 0 auto; }
}

/* --- Contact --- */
.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-sm);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}

/* --- Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Hero: animated bodygraph --- */
.hero__visual svg {
  animation: heroFloat 7s ease-in-out infinite alternate;
}
@keyframes heroFloat {
  from { transform: translateY(0); }
  to   { transform: translateY(-14px); }
}
.hero__visual svg line {
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: heroDraw 1.6s ease forwards;
}
.hero__visual svg line:nth-of-type(1) { animation-delay: 0.3s; }
.hero__visual svg line:nth-of-type(2) { animation-delay: 0.55s; }
.hero__visual svg line:nth-of-type(3) { animation-delay: 0.8s; }
.hero__visual svg line:nth-of-type(4) { animation-delay: 1.0s; }
.hero__visual svg line:nth-of-type(5) { animation-delay: 1.2s; }
.hero__visual svg line:nth-of-type(6) { animation-delay: 1.4s; }
.hero__visual svg line:nth-of-type(7) { animation-delay: 1.6s; }
@keyframes heroDraw {
  to { stroke-dashoffset: 0; }
}
.hero__visual svg polygon,
.hero__visual svg rect {
  opacity: 0;
  animation: heroFade 0.9s ease forwards;
}
.hero__visual svg polygon:nth-of-type(1) { animation-delay: 0.2s; }
.hero__visual svg polygon:nth-of-type(2) { animation-delay: 0.4s; }
.hero__visual svg rect:nth-of-type(1) { animation-delay: 0.6s; }
.hero__visual svg rect:nth-of-type(2) { animation-delay: 0.8s; }
.hero__visual svg polygon:nth-of-type(3) { animation-delay: 1.0s; }
.hero__visual svg polygon:nth-of-type(4) { animation-delay: 1.1s; }
.hero__visual svg rect:nth-of-type(3) { animation-delay: 1.3s; }
.hero__visual svg rect:nth-of-type(4) { animation-delay: 1.5s; }
@keyframes heroFade {
  to { opacity: 1; }
}
.hero__visual svg circle {
  opacity: 0;
  animation: heroPulseIn 0.6s ease 1.8s forwards;
}
@keyframes heroPulseIn {
  0% { opacity: 0; }
  60% { opacity: 1; }
  100% { opacity: 0.9; }
}
/* staggered hero text */
.hero__content > * {
  opacity: 0;
  transform: translateY(16px);
  animation: heroText 0.8s ease forwards;
}
.hero__content > *:nth-child(1) { animation-delay: 0.1s; }
.hero__content > *:nth-child(2) { animation-delay: 0.25s; }
.hero__content > *:nth-child(3) { animation-delay: 0.4s; }
.hero__content > *:nth-child(4) { animation-delay: 0.55s; }
@keyframes heroText {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__visual svg, .hero__visual svg *, .hero__content > * {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }
}

/* --- Stats strip --- */
.stats {
  background: var(--color-warm-dark);
  padding: var(--space-3xl) 0;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  text-align: center;
}
.stat__num {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: var(--color-copper);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.6);
  margin-top: var(--space-xs);
}
@media (max-width: 640px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- Type cards --- */
.type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}
@media (max-width: 968px) { .type-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .type-grid { grid-template-columns: 1fr; } }
.type-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.type-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-sand);
}
.type-tile__pct {
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-taupe);
  margin-bottom: var(--space-xs);
}
.type-tile h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-sm);
}
.type-tile p {
  font-size: var(--font-size-sm);
  color: var(--color-text-soft);
  line-height: 1.65;
  margin: 0;
}
.type-tile__bar {
  height: 3px;
  background: var(--color-border-light);
  border-radius: 2px;
  margin: var(--space-md) auto 0;
  width: 80%;
  overflow: hidden;
  position: relative;
}
.type-tile__bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--color-accent);
  border-radius: 2px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}
.revealed .type-tile__bar i,
.type-tile.revealed .type-tile__bar i { width: var(--pct, 50%); }

/* --- FAQ Accordion --- */
.faq {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
}
.faq details {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-lg) var(--space-xl);
  font-weight: 600;
  font-size: var(--font-size-base);
  color: var(--color-warm-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  transition: background var(--transition);
}
.faq summary:hover { background: var(--color-cream); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-taupe);
  line-height: 1;
  transition: transform var(--transition);
  flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq__answer {
  padding: 0 var(--space-xl) var(--space-lg);
  font-size: var(--font-size-sm);
  color: var(--color-text-soft);
  line-height: 1.8;
}

/* --- Back to top --- */
.to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-warm-dark);
  color: var(--color-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
  z-index: 90;
  box-shadow: var(--shadow-md);
}
.to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { background: var(--color-taupe-dark); }
