/* Raskusi — premium dark landing */

:root {
  --ink: #121212;
  --sand: #c4a574;
  --sand-light: #d4bc8e;
  --sand-dim: #8a7350;
  --parchment: #f7f1e6;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--ink);
  color: #f5f5f5;
}

/* --- Atmosphere --- */

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(196, 165, 116, 0.12), transparent 55%),
    radial-gradient(800px 500px at 80% 90%, rgba(138, 115, 80, 0.08), transparent 50%),
    linear-gradient(180deg, #161616 0%, #121212 45%, #101010 100%);
  --parallax-x: 0px;
  --parallax-y: 0px;
  transform: translate(calc(var(--parallax-x) * 0.35), calc(var(--parallax-y) * 0.35));
  transition: transform 0.45s ease-out;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  animation: orb-drift 14s ease-in-out infinite;
}

.orb-a {
  width: 42vw;
  height: 42vw;
  max-width: 420px;
  max-height: 420px;
  left: -8%;
  top: 18%;
  background: rgba(196, 165, 116, 0.16);
}

.orb-b {
  width: 36vw;
  height: 36vw;
  max-width: 360px;
  max-height: 360px;
  right: -6%;
  top: 42%;
  background: rgba(168, 138, 90, 0.12);
  animation-delay: -5s;
  animation-duration: 18s;
}

.orb-c {
  width: 28vw;
  height: 28vw;
  max-width: 280px;
  max-height: 280px;
  left: 35%;
  bottom: -8%;
  background: rgba(212, 188, 142, 0.08);
  animation-delay: -9s;
  animation-duration: 16s;
}

@keyframes orb-drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(18px, -22px) scale(1.08);
  }
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
}

.header-fade {
  animation: fade-down 0.8s ease both;
}

@keyframes fade-down {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.logo-mark {
  position: relative;
}

.logo-mark::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 165, 116, 0.55), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s ease;
}

.logo-mark:hover::after {
  transform: scaleX(1);
}

/* --- Form --- */

.field-line {
  border-radius: 0;
}

textarea.field-line {
  padding-left: 0.15rem;
  padding-right: 0.15rem;
  border-radius: 2px;
}

.gender-btn {
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease, transform 0.2s ease;
}

.gender-btn:hover {
  transform: translateY(-1px);
}

.gender-btn.is-active {
  border-color: var(--sand);
  color: var(--sand-light);
  background: rgba(196, 165, 116, 0.1);
  box-shadow: 0 0 0 1px rgba(196, 165, 116, 0.15);
}

.stage-panel {
  animation: panel-in 0.55s ease both;
}

#stage-form .space-y-6 > * {
  animation: panel-in 0.6s ease both;
}

#stage-form .space-y-6 > *:nth-child(1) {
  animation-delay: 0.05s;
}

#stage-form .space-y-6 > *:nth-child(2) {
  animation-delay: 0.12s;
}

#stage-form .space-y-6 > *:nth-child(3) {
  animation-delay: 0.2s;
}

#stage-form .btn-gold {
  animation: panel-in 0.65s ease both;
  animation-delay: 0.28s;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --- Cookie --- */

.cookie-glow {
  position: absolute;
  width: min(70vw, 340px);
  height: min(70vw, 340px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 188, 142, 0.22) 0%, rgba(196, 165, 116, 0.08) 40%, transparent 70%);
  animation: glow-pulse 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glow-pulse {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.cookie-wrap {
  transform-origin: center center;
  animation: cookie-float 4.2s ease-in-out infinite;
}

.cookie-wrap:hover .cookie-svg {
  animation: cookie-sway 1.5s ease-in-out infinite;
}

.drop-shadow-cookie {
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.45));
}

@keyframes cookie-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes cookie-sway {
  0%,
  100% {
    transform: rotate(-3deg);
  }
  50% {
    transform: rotate(3.5deg);
  }
}

/* Crack sequence — fixed size during break, expand only after reveal */

.cookie-wrap.is-cracking {
  animation: none;
}

.cookie-wrap.is-cracking.is-impact {
  animation: cookie-impact 0.45s ease;
}

@keyframes cookie-impact {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.08);
  }
  60% {
    transform: scale(0.97);
  }
  100% {
    transform: scale(1);
  }
}

.cookie-wrap.is-cracking .cookie-glow {
  animation: crack-flash 0.7s ease forwards;
}

@keyframes crack-flash {
  0% {
    opacity: 0.7;
    transform: scale(0.92);
  }
  40% {
    opacity: 1;
    transform: scale(1.25);
    background: radial-gradient(
      circle,
      rgba(255, 236, 190, 0.45) 0%,
      rgba(196, 165, 116, 0.12) 45%,
      transparent 70%
    );
  }
  100% {
    opacity: 0.25;
    transform: scale(1.05);
  }
}

#cookie-stage.is-fortune .cookie-glow {
  opacity: 0.3;
  animation: none;
}

.cookie-wrap.is-cracking .cookie-svg {
  animation: cookie-precrack 0.42s ease forwards;
  pointer-events: none;
}

@keyframes cookie-precrack {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  45% {
    transform: scale(1.08) rotate(-2deg);
    opacity: 1;
  }
  70% {
    transform: scale(1.02) rotate(1deg);
    opacity: 0.85;
  }
  100% {
    transform: scale(0.96) rotate(0deg);
    opacity: 0;
  }
}

.cookie-wrap.is-cracking #cookie-left,
.cookie-wrap.is-cracking #cookie-right {
  opacity: 1;
  z-index: 0;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.4));
}

.cookie-wrap.is-cracking #cookie-left {
  animation: crack-left 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.36s both;
}

.cookie-wrap.is-cracking #cookie-right {
  animation: crack-right 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.36s both;
}

@keyframes crack-left {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  25% {
    transform: translate(-6%, -6%) rotate(-8deg) scale(1.04);
    opacity: 1;
  }
  100% {
    transform: translate(-62%, 12%) rotate(-28deg) scale(0.9);
    opacity: 0.55;
  }
}

@keyframes crack-right {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  25% {
    transform: translate(6%, -6%) rotate(8deg) scale(1.04);
    opacity: 1;
  }
  100% {
    transform: translate(62%, 14%) rotate(28deg) scale(0.9);
    opacity: 0.55;
  }
}

.cookie-wrap.is-cracking.is-revealed {
  width: min(88vw, 300px);
  height: auto;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.cookie-wrap.is-cracking.is-revealed #cookie-left,
.cookie-wrap.is-cracking.is-revealed #cookie-right {
  width: 100%;
  height: 180px;
  top: 50%;
  margin-top: -90px;
}

/* Crumbs */

.crumb-layer {
  z-index: 1;
  overflow: visible;
}

.crumb {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 6px;
  height: 5px;
  border-radius: 40% 60% 55% 45%;
  background: #c4a574;
  opacity: 0;
  pointer-events: none;
}

.cookie-wrap.is-cracking .crumb {
  animation: crumb-fly 0.95s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes crumb-fly {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.6) rotate(0deg);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.3) rotate(var(--rot));
  }
}

/* Fortune slip */

.fortune-slip {
  border-left: 1px solid rgba(42, 37, 32, 0.08);
  border-right: 1px solid rgba(42, 37, 32, 0.08);
  z-index: 2;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 248, 230, 0.08);
}

.fortune-slip.opacity-0 {
  opacity: 0 !important;
}

.fortune-slip.is-visible {
  opacity: 1 !important;
  pointer-events: auto;
  animation: slip-rise 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fortune-slip.is-visible.is-centered-reveal {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: min(72vw, 240px) !important;
  max-height: 70%;
  overflow: hidden;
  z-index: 3;
}

.fortune-slip.is-visible.relative {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: 100% !important;
  max-height: none;
  overflow: visible;
}

@keyframes slip-rise {
  0% {
    opacity: 0;
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
  }
}

#cookie-stage.is-fortune {
  margin-bottom: 1.5rem;
}

#stage-again {
  margin-top: 1.75rem;
}

.fortune-inner p + p {
  border-top: 1px solid rgba(42, 37, 32, 0.1);
  padding-top: 1.15rem;
}

.fortune-inner p {
  animation: line-fade 0.7s ease both;
}

.fortune-slip.is-visible #fortune-block-1 {
  animation-delay: 0.15s;
}

.fortune-slip.is-visible #fortune-block-2 {
  animation-delay: 0.35s;
}

.fortune-slip.is-visible #fortune-block-3 {
  animation-delay: 0.55s;
}

@keyframes line-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Loader / buttons */

.loader-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(196, 165, 116, 0.2);
  border-top-color: var(--sand);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-gold {
  position: relative;
  overflow: hidden;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
  box-shadow: 0 10px 30px rgba(196, 165, 116, 0.18);
}

.btn-gold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 20%,
    rgba(255, 255, 255, 0.28) 45%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform 0.7s ease;
}

.btn-gold:hover::after {
  transform: translateX(120%);
}

.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(196, 165, 116, 0.28);
}

.btn-gold:active {
  transform: translateY(1px);
}

.btn-ghost {
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.btn-ghost:hover {
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .orb,
  .cookie-glow,
  .cookie-wrap,
  .cookie-wrap:hover .cookie-svg,
  .cookie-wrap.is-cracking .cookie-svg,
  .cookie-wrap.is-cracking #cookie-left,
  .cookie-wrap.is-cracking #cookie-right,
  .cookie-wrap.is-cracking .crumb,
  .cookie-wrap.is-cracking.is-impact,
  .fortune-slip.is-visible,
  .fortune-inner p,
  .loader-ring,
  .stage-panel,
  #stage-form .space-y-6 > *,
  #stage-form .btn-gold,
  .header-fade,
  .btn-gold::after {
    animation: none !important;
    transition: none !important;
  }

  .fortune-slip.is-visible {
    opacity: 1 !important;
    filter: none;
  }
}

/* --- Hero / SEO / legal --- */

.hero-brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  color: #f3efe6;
  margin: 0 0 0.65rem;
  animation: fade-down 0.9s ease both;
}

.hero-tagline {
  max-width: 26rem;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.42);
  margin: 0 auto 2rem;
  animation: panel-in 0.7s ease both;
  animation-delay: 0.1s;
}

.seo-section {
  padding: 4.5rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.seo-section-alt {
  background: rgba(255, 255, 255, 0.015);
}

.seo-inner {
  max-width: 40rem;
  margin: 0 auto;
}

.seo-section h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  font-weight: 600;
  color: #f0ebe3;
  margin: 0 0 0.75rem;
}

.seo-lead {
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
}

.seo-section p {
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.seo-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.35rem;
}

.seo-steps li {
  display: grid;
  gap: 0.35rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(196, 165, 116, 0.18);
}

.seo-steps strong {
  color: var(--sand-light);
  font-weight: 500;
  font-size: 0.95rem;
}

.seo-steps span {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.9rem;
  line-height: 1.55;
}

.faq-list {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0 0.85rem;
}

.faq-item summary {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.98rem;
  list-style: none;
  padding: 0.55rem 0;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  float: right;
  color: var(--sand);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: '–';
}

.faq-item p {
  margin: 0.15rem 0 0.35rem;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.9rem;
}

.site-footer {
  padding: 2rem 1.25rem 2.5rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer p {
  margin: 0 0 0.85rem;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.22);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.25rem;
  justify-content: center;
}

.footer-nav a {
  font-size: 0.72rem;
  color: rgba(196, 165, 116, 0.55);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.footer-nav a:hover {
  color: var(--sand-light);
}

.legal-page {
  margin: 0;
  min-height: 100vh;
  background: #121212;
  color: rgba(255, 255, 255, 0.78);
  font-family: Manrope, system-ui, sans-serif;
}

.legal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.legal-header a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  letter-spacing: 0.35em;
  font-size: 0.85rem;
}

.legal-main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.legal-main h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: #f3efe6;
  margin: 0 0 1rem;
}

.legal-main h2 {
  font-size: 1.05rem;
  color: var(--sand-light);
  margin: 1.75rem 0 0.6rem;
  font-weight: 500;
}

.legal-main p,
.legal-main li {
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.95rem;
}

.legal-lead {
  color: rgba(255, 255, 255, 0.7) !important;
}

.legal-note {
  margin-top: 2rem;
  font-size: 0.85rem !important;
  color: rgba(255, 255, 255, 0.35) !important;
}

.legal-main a {
  color: var(--sand);
}
