/* ==========================================================================
   CONOSCO.SI
   Monochrome Typographic Cinema
   ========================================================================== */

:root {
  --bg-void: #000000;
  --text-pure: #ffffff;
  --text-silver: #cccccc;
  --text-muted: #555555;
  --border-line: #222222;

  --font-serif: "Cinzel", Georgia, serif;
  --font-sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", SFMono-Regular, Menlo, Monaco, monospace;
  --font-cursive: "Pinyon Script", "Snell Roundhand", "Bickham Script Pro", "Brush Script MT", cursive;

  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-dissolve: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-void);
  color: var(--text-pure);
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: #ffffff;
  color: #000000;
}

.mono {
  font-family: var(--font-mono);
}

/* Background Atmosphere */
#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Minimalist Frame Layout */
.minimal-stage {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  position: relative;
  user-select: none;
}

/* --- QUIET HEADER --- */
.quiet-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
}

.cursive-logo {
  font-family: var(--font-cursive);
  font-size: clamp(2.2rem, 4.2vw, 3.2rem);
  font-weight: 400;
  color: var(--text-pure);
  letter-spacing: 0.02em;
  line-height: 1;
  text-shadow: 0 0 25px rgba(255, 255, 255, 0.25);
  cursor: default;
  transition: opacity 0.3s var(--ease-cinematic);
}

.cursive-logo:hover {
  opacity: 0.85;
}

/* Buy Button in Header */
.buy-btn {
  background: transparent;
  color: var(--text-pure);
  border: 1px solid var(--border-line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  padding: 0.45rem 1.35rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.25s var(--ease-cinematic);
}

.buy-btn:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* --- STAGE CONTAINER --- */
.stage-container {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  z-index: 5;
  cursor: pointer;
}

.display-frame {
  max-width: 95vw;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

/* Main Typographic Display */
.main-display {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 6.8vw, 6.2rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--text-pure);
  min-height: 1.25em;
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  justify-content: center;
  align-items: center;
  filter: drop-shadow(0 0 50px rgba(255, 255, 255, 0.16));
  transition: font-size 0.35s var(--ease-cinematic), letter-spacing 0.35s var(--ease-cinematic);
}

/* Dynamically scaled down for longer phrases like 'SUPERINTELLIGENCE' and 'THAT JUST KNOWS.' */
.main-display.long-phrase {
  font-size: clamp(1.3rem, 4.5vw, 4.1rem);
  letter-spacing: 0.04em;
}

/* Individual Character Animation States */
.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  filter: blur(10px);
  transition: 
    opacity 0.85s var(--ease-cinematic), 
    transform 0.85s var(--ease-cinematic), 
    filter 0.85s var(--ease-cinematic);
  will-change: opacity, transform, filter;
}

.char.space {
  width: 0.35em;
}

/* Directional vertical entry starting classes */
.char.from-bottom {
  transform: translateY(32px) scale(0.96);
  opacity: 0;
  filter: blur(12px);
}

.char.from-top {
  transform: translateY(-32px) scale(0.96);
  opacity: 0;
  filter: blur(12px);
}

.char.entering {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0px);
}

/* Directional vertical exit classes */
.char.exiting-up {
  opacity: 0;
  transform: translateY(-28px) scale(1.02);
  filter: blur(14px);
  transition: 
    opacity 0.65s var(--ease-dissolve), 
    transform 0.65s var(--ease-dissolve), 
    filter 0.65s var(--ease-dissolve);
}

.char.exiting-down {
  opacity: 0;
  transform: translateY(28px) scale(1.02);
  filter: blur(14px);
  transition: 
    opacity 0.65s var(--ease-dissolve), 
    transform 0.65s var(--ease-dissolve), 
    filter 0.65s var(--ease-dissolve);
}

/* Meaning Subtitle */
.meaning-display {
  min-height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.meaning-text {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.4vw, 1.55rem);
  font-weight: 300;
  color: var(--text-silver);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(10px);
  filter: blur(6px);
  transition: 
    opacity 0.9s var(--ease-cinematic), 
    transform 0.9s var(--ease-cinematic), 
    filter 0.9s var(--ease-cinematic);
}

.meaning-text.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0px);
}

.meaning-text.exiting-up {
  opacity: 0;
  transform: translateY(-16px);
  filter: blur(8px);
  transition: 
    opacity 0.6s var(--ease-dissolve), 
    transform 0.6s var(--ease-dissolve), 
    filter 0.6s var(--ease-dissolve);
}

.meaning-text.exiting-down {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(8px);
  transition: 
    opacity 0.6s var(--ease-dissolve), 
    transform 0.6s var(--ease-dissolve), 
    filter 0.6s var(--ease-dissolve);
}

/* --- QUIET FOOTER --- */
.quiet-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
}

.footer-left {
  color: var(--text-muted);
}

/* Timeline Dots */
.timeline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.timeline-dot {
  width: 28px;
  height: 2px;
  background: var(--border-line);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.5s var(--ease-cinematic);
}

.timeline-dot:hover {
  background: var(--text-muted);
}

.timeline-dot.active {
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  height: 2px;
}

/* Footer Controls */
.footer-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.playback-btn, .audio-btn {
  background: transparent;
  border: 1px solid var(--border-line);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  padding: 0.4rem 0.85rem;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s var(--ease-cinematic);
}

.playback-btn:hover, .audio-btn:hover {
  color: var(--text-pure);
  border-color: var(--text-silver);
}

/* Sound Unlock Prompt */
.sound-prompt {
  position: fixed;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 14, 14, 0.9);
  border: 1px solid var(--border-line);
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--text-silver);
  z-index: 20;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.9);
  transition: opacity 0.6s var(--ease-cinematic), transform 0.6s var(--ease-cinematic);
  animation: promptGlow 3.5s infinite ease-in-out;
}

.sound-prompt:hover {
  border-color: var(--text-pure);
  color: #ffffff;
}

.sound-prompt.hidden {
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
}

@keyframes promptGlow {
  0%, 100% { border-color: #222222; color: #777777; }
  50% { border-color: #555555; color: #ffffff; }
}

/* Mobile-specific element defaults (Hidden on desktop) */
.vertical-timeline {
  display: none;
}

.swipe-hint {
  display: none;
}

.mobile-nav-arrows {
  display: none;
}

.nav-arrow-btn {
  background: transparent;
  border: 1px solid var(--border-line);
  color: var(--text-silver);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1;
  padding: 0;
  transition: all 0.2s var(--ease-cinematic);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.nav-arrow-btn:hover, .nav-arrow-btn:active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

/* ==========================================================================
   MOBILE EXPERIENCE — Optimized for Phone Screens (<= 9 inches)
   Vertical Up/Down Scrolling Format & Touch Ergonomics
   ========================================================================== */
@media (max-width: 850px) {
  html, body {
    height: 100dvh;
    touch-action: pan-y;
    overscroll-behavior: none;
  }

  .minimal-stage {
    min-height: 100dvh;
    height: 100dvh;
  }

  /* Compact Top Bar with Safe Area Insets */
  .quiet-header {
    padding: max(1.15rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) 1rem max(1.25rem, env(safe-area-inset-left));
  }

  .cursive-logo {
    font-size: clamp(2rem, 6.8vw, 2.5rem);
  }

  .buy-btn {
    padding: 0.45rem 1.1rem;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Stage & Vertical Alignment */
  .stage-container {
    padding: 1.5rem 1.25rem;
    cursor: default;
    touch-action: pan-y;
  }

  .display-frame {
    max-width: 96vw;
    gap: 1.5rem;
  }

  /* Responsive Monumental Typography */
  .main-display {
    font-size: clamp(1.8rem, 8vw, 3.8rem);
    letter-spacing: 0.08em;
    min-height: 1.3em;
    /* Strict single-line enforcement on mobile */
    white-space: nowrap;
    flex-wrap: nowrap;
  }

  /* Long phrases like 'SUPERINTELLIGENCE' and 'THAT JUST KNOWS.' */
  .main-display.long-phrase {
    font-size: clamp(1.05rem, 5.1vw, 2.2rem);
    letter-spacing: 0.02em;
  }

  .char.space {
    width: 0.28em;
  }

  /* Meaning text scaled for vertical phone screens */
  .meaning-display {
    min-height: 3rem;
  }

  .meaning-text {
    font-size: clamp(0.76rem, 3.3vw, 1rem);
    letter-spacing: 0.12em;
    line-height: 1.5;
    padding: 0 1rem;
    max-width: 92vw;
  }

  /* Hide horizontal timeline on mobile */
  .timeline {
    display: none;
  }

  /* Sleek Vertical Progress Rail along the right screen margin */
  .vertical-timeline {
    position: fixed;
    right: max(0.85rem, env(safe-area-inset-right));
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 15;
    padding: 6px 3px;
  }

  .vertical-dot {
    width: 3px;
    height: 18px;
    background: var(--border-line);
    border: none;
    border-radius: 1px;
    cursor: pointer;
    padding: 0;
    transition: all 0.4s var(--ease-cinematic);
    -webkit-tap-highlight-color: transparent;
  }

  .vertical-dot.active {
    background: #ffffff;
    height: 30px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  }

  .vertical-dot:hover {
    background: var(--text-silver);
  }

  /* Tactile Up/Down Chevrons in Footer */
  .footer-left {
    display: flex;
    align-items: center;
  }

  .mobile-nav-arrows {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.6rem;
  }

  /* Subtle Vertical Swipe Guidance */
  .swipe-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: fixed;
    bottom: 5.25rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.64rem;
    letter-spacing: 0.22em;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 12;
    opacity: 0.75;
    animation: hintPulse 3s infinite ease-in-out;
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .swipe-hint.hidden {
    opacity: 0;
    transform: translate(-50%, 8px);
    pointer-events: none;
  }

  .swipe-arrow {
    display: inline-block;
    animation: arrowBob 1.6s infinite ease-in-out alternate;
  }

  @keyframes arrowBob {
    0% { transform: translateY(-2px); }
    100% { transform: translateY(2px); }
  }

  @keyframes hintPulse {
    0%, 100% { opacity: 0.4; color: #444444; }
    50% { opacity: 0.9; color: #999999; }
  }

  /* Sound unlock prompt on mobile */
  .sound-prompt {
    bottom: 4.8rem;
    font-size: 0.68rem;
    padding: 0.45rem 1.15rem;
  }

  /* Compact Footer */
  .quiet-footer {
    padding: 1rem max(1.25rem, env(safe-area-inset-right)) max(1.2rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
    font-size: 0.72rem;
  }

  .footer-right {
    gap: 0.65rem;
  }

  .playback-btn, .audio-btn {
    padding: 0.42rem 0.75rem;
    font-size: 0.66rem;
    min-height: 36px;
  }

  /* Mobile Acquisition Modal */
  .buy-modal {
    width: 94vw;
    max-width: 420px;
  }

  .modal-card {
    padding: 1.6rem 1.4rem;
  }

  .modal-title {
    font-size: 1.75rem;
  }

  .form-input, .form-textarea {
    font-size: 16px; /* Prevents auto-zoom in iOS Safari */
    padding: 0.75rem 0.85rem;
  }

  .btn-inquire {
    padding: 0.95rem 1.5rem;
    min-height: 48px;
  }
}

/* Acquisition Dialog */
.buy-modal {
  margin: auto;
  padding: 0;
  background: transparent;
  border: none;
  max-width: 520px;
  width: 90vw;
  color: var(--text-pure);
  z-index: 1000;
}

.buy-modal::backdrop {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.modal-card {
  background: #090909;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 2.25rem 2.5rem;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.95), 0 0 40px rgba(255, 255, 255, 0.05);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  transition: color 0.2s ease;
}

.modal-close-btn:hover {
  color: #ffffff;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.modal-desc {
  font-size: 0.92rem;
  color: var(--text-silver);
  line-height: 1.6;
  margin-bottom: 0.85rem;
  font-weight: 300;
}

.modal-price-tag {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  padding: 0.45rem 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #333333;
  display: inline-block;
  border-radius: 3px;
}



/* Masked Acquisition Form */
.acquisition-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.18em;
}

.form-input, .form-textarea {
  width: 100%;
  background: #000000;
  border: 1px solid #242424;
  color: var(--text-pure);
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  border-radius: 3px;
  outline: none;
  transition: all 0.2s var(--ease-cinematic);
}

.form-input:focus, .form-textarea:focus {
  border-color: #ffffff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.12);
}

.form-input::placeholder, .form-textarea::placeholder {
  color: #444444;
}

.form-textarea {
  resize: vertical;
  min-height: 55px;
}

.btn-inquire {
  display: block;
  width: 100%;
  text-align: center;
  background: #ffffff;
  color: #000000;
  border: none;
  cursor: pointer;
  padding: 0.85rem 1.5rem;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  border-radius: 3px;
  margin-top: 0.5rem;
  transition: all 0.2s var(--ease-cinematic);
}

.btn-inquire:hover {
  background: #d4d4d4;
  transform: translateY(-1px);
}

.btn-inquire:disabled {
  background: #333333;
  color: #777777;
  cursor: not-allowed;
  transform: none;
}

.acq-status {
  min-height: 1.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-align: center;
  color: var(--text-silver);
  transition: opacity 0.3s ease;
}

.acq-status.success {
  color: #ffffff;
}

.acq-status.error {
  color: #ff5555;
}
