/* ── Language Switcher ── */
.lang-switcher {
  position: fixed;
  top: 1.4rem;
  right: 1.6rem;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--blush);
  border-radius: 100px;
  padding: 0.3rem 0.5rem;
  box-shadow: 0 4px 16px rgba(122,74,66,0.1);
}

.lang-btn {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.65rem;
  border-radius: 100px;
  border: none;
  background: transparent;
  color: var(--deep);
  opacity: 0.45;
  cursor: pointer;
  transition: all 0.2s ease;
}
.lang-btn.active {
  background: linear-gradient(135deg, var(--rose), var(--deep));
  color: var(--white);
  opacity: 1;
}
.lang-btn:not(.active):hover { opacity: 0.8; }

.lang-divider {
  width: 1px;
  height: 12px;
  background: var(--blush);
  flex-shrink: 0;
}

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

:root {
  --cream:   #faf7f4;
  --blush:   #f2ddd5;
  --rose:    #c9877a;
  --deep:    #7a4a42;
  --charcoal:#2b2020;
  --gold:    #c8a882;
  --white:   #ffffff;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Jost', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Film grain overlay — gives that luxury editorial print feeling ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.68' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.032;
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(160deg, #fdf6f0 0%, #f7e8e0 50%, #f0d9cf 100%);
}

.shimmer-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
}
.orb-1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #e8c4b8 0%, #f2ddd5 60%, transparent 100%);
  top: -120px; right: -140px;
  animation: float 8s ease-in-out infinite;
}
.orb-2 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, #c8a882 0%, #e8d5c0 60%, transparent 100%);
  bottom: -80px; left: -100px;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50%       { transform: translateY(-24px) scale(1.04); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  padding: 2rem;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 1.4rem;
}

h1 {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--charcoal);
  margin-bottom: 1.4rem;
}
h1 em {
  background: linear-gradient(120deg, var(--rose) 0%, var(--deep) 40%, var(--gold) 70%, var(--rose) 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: italic;
  animation: shimmerText 5s linear infinite;
}

@keyframes shimmerText {
  from { background-position: 0% center; }
  to   { background-position: 220% center; }
}

.sub {
  font-size: 1rem;
  color: var(--deep);
  opacity: 0.75;
  letter-spacing: 0.03em;
}

/* ── Scroll hint arrow ── */
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
  transition: opacity 0.4s ease;
  cursor: pointer;
}
.scroll-hint.hidden { opacity: 0; pointer-events: none; }

.scroll-hint-label {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose);
  opacity: 0.7;
}

.scroll-arrow {
  color: var(--rose);
  opacity: 0.6;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

/* ── Section divider ── */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0 2rem;
  margin-top: -1rem;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blush));
}
.section-divider::after {
  background: linear-gradient(90deg, var(--blush), transparent);
}
.divider-gem {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.6;
}

/* ── Scope hint ── */
.scope-hint {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--rose);
  opacity: 0.6;
  margin-bottom: 2rem;
  margin-top: -1.6rem;
}

/* ── Scope Section ── */
.scope-section {
  padding: 4rem 2rem 3rem;
  text-align: center;
}

.section-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2.4rem;
}

.scope-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  max-width: 680px;
  margin: 0 auto;
}

.scope-btn {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  padding: 0.7rem 1.5rem;
  border-radius: 100px;
  border: 1px solid var(--blush);
  background: var(--white);
  color: var(--deep);
  cursor: pointer;
  transition: all 0.25s ease;
}
.scope-btn:hover {
  background: var(--blush);
  border-color: var(--rose);
  color: var(--deep);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(201,135,122,0.25);
}
.scope-btn.active {
  background: linear-gradient(135deg, var(--rose), var(--deep));
  border-color: transparent;
  color: var(--white);
  box-shadow: 0 10px 32px rgba(122,74,66,0.35);
  transform: translateY(-3px);
  letter-spacing: 0.1em;
}

/* first-load attention pulse — fires once then stops */
.scope-btn {
  animation: scopeEntrance 0.5s ease both;
}
.scope-btn:nth-child(1) { animation-delay: 0.1s; }
.scope-btn:nth-child(2) { animation-delay: 0.18s; }
.scope-btn:nth-child(3) { animation-delay: 0.26s; }
.scope-btn:nth-child(4) { animation-delay: 0.34s; }
.scope-btn:nth-child(5) { animation-delay: 0.42s; }
.scope-btn:nth-child(6) { animation-delay: 0.50s; }
.scope-btn:nth-child(7) { animation-delay: 0.58s; }

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

/* ── Affirmation Card ── */
.affirmation-section {
  padding: 2rem 2rem 6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card {
  display: none;
  width: 100%;
  max-width: 600px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(122,74,66,0.12), 0 4px 16px rgba(122,74,66,0.06);
  overflow: hidden;
  animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.card.visible { display: block; }

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

.card-inner {
  padding: 3rem 3rem 2.5rem;
  position: relative;
}
.card-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blush), var(--rose), var(--gold), var(--rose), var(--blush));
  background-size: 200% auto;
  animation: shimmerBar 3s linear infinite;
}

@keyframes shimmerBar {
  from { background-position: 0% center; }
  to   { background-position: 200% center; }
}

.card-scope {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 1.6rem;
}

.affirmation-text {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 300;
  line-height: 1.55;
  color: var(--charcoal);
  font-style: italic;
  min-height: 4em;
}

/* ── Card actions ── */
.card-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 2.4rem;
  flex-wrap: wrap;
  align-items: center;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  padding: 0.6rem 1.4rem;
  border-radius: 100px;
  border: 1px solid var(--blush);
  background: transparent;
  color: var(--deep);
  cursor: pointer;
  transition: all 0.2s ease;
}
.action-btn:hover {
  background: var(--blush);
  border-color: var(--rose);
}

/* ── Share wrap & tray ── */
.share-wrap {
  position: relative;
}

.share-tray {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--blush);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(122,74,66,0.15);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 160px;
  z-index: 100;
  animation: popUp 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.share-tray[hidden] { display: none; }

@keyframes popUp {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.tray-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--deep);
  cursor: pointer;
  transition: background 0.15s ease;
  text-align: left;
  width: 100%;
}
.tray-btn:hover { background: var(--blush); }

/* ── Save button ── */
.save-btn {
  margin-left: auto;
}

/* ── Streak line ── */
.streak-line {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 1.8rem;
  min-height: 1em;
}

/* ── Send tray extras ── */
.tray-header {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--deep);
  padding: 0.3rem 0.9rem 0.1rem;
}

.tray-preview {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-style: italic;
  color: var(--charcoal);
  opacity: 0.65;
  padding: 0.2rem 0.9rem 0.5rem;
  line-height: 1.5;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tray-divider {
  height: 1px;
  background: var(--blush);
  margin: 0.2rem 0.5rem 0.4rem;
}

/* ── Instagram streak label ── */
.ig-streak {
  font-family: 'Jost', sans-serif;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c8a882;
  position: relative;
  z-index: 1;
  margin-top: 24px;
}

/* ── Placeholder card ── */
.card-placeholder {
  width: 100%;
  max-width: 600px;
  border: 1.5px dashed var(--blush);
  border-radius: 24px;
  padding: 3rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  animation: rise 0.4s ease both;
}
.card-placeholder.hidden { display: none; }

.placeholder-icon {
  font-size: 1.2rem;
  color: var(--gold);
  opacity: 0.5;
  animation: float 3s ease-in-out infinite;
}

.placeholder-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 300;
  color: var(--charcoal);
  opacity: 0.35;
  line-height: 1.6;
}

/* ── Loading dots ── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}
.loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.loading-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}
.loading-text {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--rose);
  opacity: 0.6;
  text-transform: uppercase;
}
.loading span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--rose);
  animation: pulse 1.2s ease-in-out infinite;
}
.loading span:nth-child(2) { animation-delay: 0.2s; }
.loading span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1;   }
}

/* ── Toast notification ── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--charcoal);
  color: var(--cream);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  padding: 0.65rem 1.4rem;
  border-radius: 100px;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.75rem;
  color: var(--rose);
  opacity: 0.7;
  letter-spacing: 0.05em;
}
footer em { font-family: var(--font-serif); font-style: italic; }

/* ── Hidden Instagram export card ── */
#igCard {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 1080px;
  height: 1080px;
  pointer-events: none;
  z-index: -1;
}

.ig-bg {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #fdf6f0 0%, #f7e8e0 45%, #edd5c8 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px;
  position: relative;
  overflow: hidden;
}

.ig-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
}
.ig-orb-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, #e8c4b8 0%, #f2ddd5 60%, transparent 100%);
  top: -200px; right: -200px;
}
.ig-orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #c8a882 0%, #e8d5c0 60%, transparent 100%);
  bottom: -150px; left: -150px;
}

.ig-eyebrow {
  font-family: 'Jost', sans-serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c9877a;
  margin-bottom: 60px;
  position: relative;
  z-index: 1;
}

.ig-quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 72px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.45;
  color: #2b2020;
  text-align: center;
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
}

.ig-brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 36px;
  font-weight: 300;
  font-style: italic;
  color: #c9877a;
  opacity: 0.7;
  position: relative;
  z-index: 1;
  margin-top: 60px;
  letter-spacing: 0.08em;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .card-inner { padding: 2rem 1.6rem 1.8rem; }
  .scope-btn  { font-size: 0.75rem; padding: 0.6rem 1.2rem; }
  .save-btn   { margin-left: 0; }
  .share-tray { left: auto; right: 0; }
}
