/* assets/styles.css — Padelia v2 */
*{ box-sizing:border-box; }
html{ scroll-behavior: smooth; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text-main);
  min-height: 100vh;

  background:
    radial-gradient(1150px 600px at 50% 18%, rgba(111,45,189,0.24), transparent 62%),
    radial-gradient(950px 500px at 80% 5%, rgba(111,45,189,0.11), transparent 58%),
    radial-gradient(1100px 520px at 50% 105%, rgba(111,45,189,0.10), transparent 70%),
    var(--bg);

  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* ========================================
   GRID BG
   ======================================== */

.bg{
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.45;
  mask-image:
    radial-gradient(70% 50% at 50% 20%, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 38%, rgba(0,0,0,0.35) 62%, transparent 100%),
    linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 40%, rgba(0,0,0,0.25) 70%, transparent 100%);
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulseSubtle {
  0%, 100% { box-shadow: 0 6px 20px rgba(111,45,189,0.25); }
  50%      { box-shadow: 0 6px 28px rgba(111,45,189,0.45); }
}

@keyframes liveDot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Hero entrance animations */
.anim-fade-in {
  opacity: 0;
  animation: fadeInUp 0.7s ease-out forwards;
}
.anim-delay-1 { animation-delay: 0.12s; }
.anim-delay-2 { animation-delay: 0.24s; }
.anim-delay-3 { animation-delay: 0.36s; }
.anim-delay-4 { animation-delay: 0.48s; }

/* Scroll-triggered animations */
.anim-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.anim-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Chat message stagger animations */
.is-visible .msg-anim {
  opacity: 0;
  animation: fadeInUp 0.5s ease-out forwards;
}
.is-visible .msg-anim-1 { animation-delay: 0.15s; }
.is-visible .msg-anim-2 { animation-delay: 0.45s; }
.is-visible .msg-anim-3 { animation-delay: 0.75s; }
.is-visible .msg-anim-4 { animation-delay: 1.05s; }

/* Subtle pulse on CTA */
.pulse-subtle {
  animation: pulseSubtle 3s ease-in-out infinite;
}

/* ========================================
   LAYOUT
   ======================================== */

.container{
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px 60px;
}

.hide-mobile { display: inline; }

/* ========================================
   TOPBAR
   ======================================== */

.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(11,15,25,0.55);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.topbar__inner{
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand__icon{
  width: 30px;
  height: 30px;
  display: block;
}

.brand__name{ 
  font-size: 17px; 
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand__badge{
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 3px 8px;
  border-radius: 999px;
  margin-left: 6px;
}

.nav{
  margin-left: 10px;
  display:flex;
  gap: 18px;
  flex: 1;
}

.nav a{
  color: var(--text-muted);
  text-decoration:none;
  font-size: 13px;
  transition: color 0.2s;
}

.nav a:hover{ color: var(--text-main); }

.actions{
  display:flex;
  gap: 10px;
  align-items:center;
  margin-left: auto;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  text-decoration:none;
  color: var(--text-main);
  background: var(--surface);
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
  font-size: 13px;
  white-space: nowrap;
}

.btn:hover{
  background: var(--surface-2);
  border-color: var(--border-strong);
}

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

.btn--primary{
  border-color: var(--padelia-purple);
  background: var(--padelia-purple);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(111,45,189,0.25);
}

.btn--primary:hover{
  background: var(--padelia-purple-dark);
  box-shadow: 0 8px 26px rgba(111,45,189,0.30);
}

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

.btn:focus-visible,
.chatbox__btn:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 2px rgba(111,45,189,0.55),
    0 0 0 6px rgba(111,45,189,0.20);
}

/* ========================================
   HERO
   ======================================== */

.hero{
  padding: 88px 0 40px;
  text-align: center;
}

.hero__badge{
  display: inline-block;
  background: rgba(111,45,189,0.15);
  border: 1px solid rgba(111,45,189,0.30);
  color: rgba(249,250,251,0.85);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 32px;
}

h1{
  margin: 0 0 16px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 800;
  color: #8B5CF6;
}

.gradient-text{
  background: linear-gradient(135deg, #a78bfa, #8B5CF6, #c084fc);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
}

.subtitle{
  margin: 16px auto 32px;
  max-width: 580px;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.55;
  font-weight: 400;
}

.hero__question{
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.hero__hint{
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: 0.02em;
}

/* ========================================
   CHATBOX (search bar)
   ======================================== */

.chatbox{
  width: min(620px, 100%);
  margin: 0 auto;
  display:flex;
  gap: 12px;
  align-items:center;
}

.chatbox__inputWrap{
  flex: 1;
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 999px;
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--border-soft);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.chatbox__input{
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-main);
  font-size: 16px;
}

.chatbox__input::placeholder{ color: rgba(249,250,251,0.40); }

.chatbox__btn{
  border: 1px solid var(--padelia-purple);
  background: var(--padelia-purple);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.15s, transform 0.08s;
}

.chatbox__btn:hover{
  background: var(--padelia-purple-dark);
}

.chatbox__btn:active{ transform: translateY(1px); }

.chatbox__inputWrap:focus-within{
  border-color: rgba(111,45,189,0.55);
  box-shadow:
    0 0 0 1px rgba(111,45,189,0.35),
    0 0 0 6px rgba(111,45,189,0.15);
  background: rgba(0,0,0,0.25);
}

/* ========================================
   CHAT DEMO (mockup)
   ======================================== */

.demo{
  max-width: 480px;
  margin: 0 auto 20px;
  padding: 0 20px;
}

.chatMock{
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(10,12,22,0.85);
  box-shadow: 0 24px 80px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.04);
  overflow: hidden;
}

.chatMock__header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}

.chatMock__brand{
  display:flex;
  align-items:center;
  gap: 10px;
}

.chatMock__logo { width: 18px; height: auto; }

.chatMock__title{
  font-size: 13px;
  font-weight: 650;
}

.chatMock__dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}

.chatMock__dot--live{
  animation: liveDot 2s ease-in-out infinite;
}

.chatMock__body{
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg{
  max-width: 85%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
}

.msg--user{
  margin-left: auto;
  background: rgba(111,45,189,0.25);
  border: 1px solid rgba(111,45,189,0.35);
}

.msg--bot{
  margin-right: auto;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

/* Tournament cards inside chat */
.tournament-card{
  margin-top: 4px;
}

.tournament-name{
  color: #a78bfa;
  font-size: 13px;
}

.tournament-details{
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-muted);
}

.tournament-actions{
  margin-top: 8px;
}

.tournament-link{
  color: #8B5CF6;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}

.tournament-link:hover{
  color: #a78bfa;
}

/* ========================================
   SECTIONS
   ======================================== */

.section{
  margin-top: 48px;
  padding: 32px;
  border-radius: var(--r-xl);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.section__header{
  text-align: center;
  margin-bottom: 32px;
}

.section__label{
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #8B5CF6;
  margin-bottom: 10px;
}

.section h2{
  margin: 0;
  font-size: clamp(22px, 3.5vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section p{
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Steps grid */
.steps-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.step-card{
  padding: 24px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  text-align: center;
  transition: border-color 0.25s, background 0.25s, transform 0.2s;
}

.step-card:hover{
  border-color: rgba(111,45,189,0.30);
  background: rgba(111,45,189,0.06);
  transform: translateY(-2px);
}

.step-card__number{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(111,45,189,0.18);
  color: #a78bfa;
  font-weight: 800;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.step-card h3{
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
}

.step-card p{
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Sources */
.sources-row{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.source-pill{
  background: rgba(111,45,189,0.15);
  border: 1px solid rgba(111,45,189,0.25);
  color: rgba(249,250,251,0.85);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 999px;
  transition: border-color 0.2s, background 0.2s;
}

.source-pill:hover{
  border-color: rgba(111,45,189,0.45);
  background: rgba(111,45,189,0.22);
}

.source-pill--soon{
  background: transparent;
  border-style: dashed;
  color: var(--text-muted);
}

.sources-note{
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

/* App section */
.section--app{
  text-align: center;
}

.section--app .appRow{
  margin-top: 16px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ========================================
   FOOTER
   ======================================== */

.link{
  color: rgba(249,250,251,0.78);
  text-decoration: none;
  font-size: 13px;
}

.link:hover{ color: var(--text-main); text-decoration: underline; }

.sep{ color: rgba(249,250,251,0.30); }

.footer{
  margin-top: 40px;
  padding: 18px 0 0;
  color: rgba(249,250,251,0.55);
  font-size: 12px;
}

.footer__inner{
  display:flex;
  gap: 10px;
  align-items:center;
  justify-content:center;
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 14px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 820px) {
  .nav { display: none; }
  .hero { padding-top: 56px; }
  .subtitle{ font-size: 17px; }
  .hide-mobile { display: none; }
  .steps-grid { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 768px) {
  .brand__icon { width: 36px; height: 36px; }
  .brand__name { font-size: 19px; }
  .brand__badge { font-size: 11px; padding: 4px 8px; }
  .btn--primary { font-size: 14px; padding: 11px 18px; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px 48px; }
  .topbar__inner { padding: 14px 16px; gap: 12px; }
  .hero { padding: 48px 0 32px; }
  
  h1 { font-size: 22px; line-height: 1.15; margin-bottom: 14px; letter-spacing: 0.05em; }
  .subtitle { font-size: 16px; margin: 14px 0 24px; max-width: 100%; }
  .hero__hint { font-size: 13px; }
  .hero__badge { font-size: 12px; padding: 5px 12px; }

  .chatbox { gap: 10px; }
  .chatbox__inputWrap { padding: 14px 16px; }
  .chatbox__btn { padding: 14px 18px; }

  .demo { padding: 0 8px; }

  .section { padding: 24px 20px; margin-top: 32px; }
  .section h2 { font-size: 22px; }
  .section p { font-size: 14px; }

  .step-card { padding: 20px 16px; }
  .step-card h3 { font-size: 14px; }

  .msg { max-width: 90%; font-size: 13px; }
}