/* ==========================================================================
   styles1.css — Legal pages (TOS & Privacy Policy)
   Mobile-first, standalone, matches Infinite Saga theme
   ========================================================================== */

:root{
  --bg: #070812;
  --fg: #e9ecff;
  --muted: rgba(233,236,255,.72);
  --glass: rgba(10,12,24,.75);
  --stroke: rgba(255,255,255,.14);
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --accent: #7c5cff;
  --accent-2: #33d6ff;
  --pad: clamp(16px, 4vw, 28px);
  --r: 18px;
  --topbar-h: 60px;
  --content-w: 900px;
}

*{ box-sizing:border-box; }
html{
  min-height:100%;
  height:-webkit-fill-available;
}
body{
  margin:0;
  min-height:100vh;
  min-height:-webkit-fill-available;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color:var(--fg);
  background:var(--bg);
  overflow-x:hidden;
  overflow-y:auto;
  -webkit-font-smoothing:antialiased;
  -webkit-tap-highlight-color:transparent;
}

a{ color:inherit; text-decoration:none; }
img{ display:block; max-width:100%; }
strong{ color:#fff; }

/* Background */
.bg-static{
  position:fixed;
  inset:0;
  z-index:-2;
  background:
    linear-gradient(to bottom, rgba(7,8,18,.34), rgba(7,8,18,.76)),
    url('../assets/slides/slide-2.webp') center top / cover no-repeat,
    #111;
  filter:saturate(1.05) contrast(1.05);
}
.bg-static::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(1000px 560px at 20% 10%, rgba(124,92,255,.18), transparent 58%),
    radial-gradient(900px 520px at 80% 20%, rgba(51,214,255,.10), transparent 56%),
    linear-gradient(to bottom, rgba(7,8,18,.12), rgba(7,8,18,.32));
}

/* Topbar */
.topbar{
  position:sticky;
  top:0;
  z-index:20;
  height:var(--topbar-h);
  padding:0 var(--pad);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:linear-gradient(to bottom, rgba(7,8,18,.92), rgba(7,8,18,.70));
  backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.brand__logo{
  width:30px;
  height:30px;
  object-fit:contain;
  border-radius:8px;
  flex-shrink:0;
}
.brandname{
  font-size:15px;
  font-weight:800;
  letter-spacing:.2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.topbarnav{
  display:flex;
  align-items:center;
  gap:12px;
}
.navlink{
  min-height:40px;
  padding:10px 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  font-size:14px;
  font-weight:700;
  color:rgba(255,255,255,.92);
}
.navlink:hover{
  background:rgba(255,255,255,.10);
}

/* Main legal card */
.legal-container{
  position:relative;
  width:min(var(--content-w), calc(100% - (var(--pad) * 2)));
  margin:18px auto 36px;
  padding:20px 16px;
  border-radius:var(--r);
  background:var(--glass);
  border:1px solid var(--stroke);
  backdrop-filter:blur(14px);
  box-shadow:var(--shadow);
  color:rgba(233,236,255,.90);
  line-height:1.72;
}
.legal-container::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  pointer-events:none;
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0));
}

.legal-container > *{
  position:relative;
  z-index:1;
}

.legal-container h1,
.legal-container .title{
  margin:0 0 6px;
  color:#fff;
  font-size:clamp(2rem, 7vw, 2.8rem);
  line-height:1.08;
  letter-spacing:-.02em;
}

.text-muted{
  color:var(--muted);
  font-size:14px;
}

.legal-container h2{
  margin:28px 0 12px;
  padding-bottom:10px;
  color:var(--accent-2);
  font-size:clamp(1.15rem, 4.5vw, 1.5rem);
  line-height:1.25;
  border-bottom:1px solid rgba(255,255,255,.10);
}

.legal-container p{
  margin:0 0 14px;
  font-size:15px;
}

.legal-container ul{
  margin:0 0 14px;
  padding-left:20px;
}

.legal-container li{
  margin-bottom:8px;
  color:rgba(233,236,255,.88);
}

.legal-container a{
  color:var(--accent);
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:2px;
  word-break:break-word;
}
.legal-container a:hover{
  color:#fff;
}

hr{
  border:none;
  border-top:1px solid rgba(255,255,255,.15);
  margin:18px 0 22px;
}

/* Better spacing for first block */
.legal-container h1 + p,
.legal-container .title + p{
  margin-bottom:0;
}

/* Long links on mobile */
.legal-container br + a,
.legal-container p a{
  overflow-wrap:anywhere;
}

/* Tablet */
@media (min-width:768px){
  :root{
    --topbar-h:64px;
  }

  .topbar{
    padding:0 clamp(18px, 3vw, 28px);
  }

  .legal-container{
    margin:28px auto 48px;
    padding:32px 28px;
  }

  .legal-container p,
  .legal-container li{
    font-size:16px;
  }
}

/* Desktop */
@media (min-width:980px){
  .legal-container{
    margin:36px auto 60px;
    padding:40px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion:reduce){
  *{
    scroll-behavior:auto !important;
  }
}
