
/* =========================
   RuleTogether Explorer — Clean CSS
   v2.0
   ========================= */

/* Root palette (site-provided) */
:root{
  --background-color:#f5f4f1;
  --default-color:#212529;
  --heading-color:#32220b;
  --accent-color:#917a5a;
  --surface-color:#ffffff;
  --contrast-color:#ffffff;
}
:root{
  --accent:#917a5a;
  --ink:#0f172a;
  --paper:#ffffff;
  --dim:#6b7280;
  /* Blob speed (lower=faster) */
  --blob-speed-a: 7s;
  --blob-speed-b: 5s;
  --blob-speed-c: 10s;
}

:root {
  --default-font: "Roboto",  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --heading-font: "Playfair Display",  sans-serif;
  --nav-font: "Poppins",  sans-serif;
}

h1, h2 {
    font-family: var(--heading-font );
    font-size: clamp(1.25rem, 3.5vw, 2rem);
    text-shadow: 0 1px 3px rgba(22,44,82,0.4);
}
h3, h4{
   font-family: var(--heading-font ); 
}

.white {
    color: #fff;
  text-shadow:
    0 0 1px rgba(0,0,0,.55),
    0 0 6px rgba(0,0,0,.35),
    0 0 14px rgba(0,0,0,.25);
}
/* Page base */
html,body{height:100%}
body{margin:0; color:var(--default-color); background:var(--background-color); font-family: system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}

/* Snap-scrolling steps */
.snap-root{ height:100vh; overflow-y:auto; scroll-snap-type: y mandatory; }
.snap-root > .step{ scroll-snap-align:start; min-height:100vh; display:grid; align-content:center; position:relative; }
.step .container{ position:relative; z-index:1; }

/* Buttons */
.btn-rt{ --bs-btn-color:#fff; --bs-btn-bg:var(--accent-color); --bs-btn-border-color:var(--accent-color); }
.btn-rt:hover{ filter:brightness(.96) }

/* ---------- STEP 1 (Create/Join) background images full-screen ---------- */
.step-name .image-wrap, .step-find .image-wrap{ position:absolute; inset:0; overflow:hidden; }
.step-name .image-wrap img, .step-find .image-wrap img{ width:100%; height:100%; object-fit:cover; }
.step-find .image-wrap .overlay{ position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.45)); }
#step-1-create .panel, #step-1-join .panel{ min-height:100vh; display:flex; align-items:center; }

/* Name Tag input */
.name-tag{ --accent:var(--accent-color); --ink:var(--heading-color); --paper:var(--surface-color); --edge:rgba(0,0,0,.08);
  background:linear-gradient(145deg, var(--paper), #f9f8f4); border:1px solid var(--edge); border-radius:16px;
  box-shadow:0 10px 30px rgba(0,0,0,.08), inset 0 0 0 2px rgba(255,255,255,.4);
  padding:14px; display:flex; align-items:center; gap:12px; max-width:640px;
}
.name-tag::before{ content:""; width:6px; align-self:stretch; border-radius:8px;
  background:linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent), white 30%));
  box-shadow:0 0 0 1px rgba(0,0,0,.04) inset;
}
.name-tag .icon{ font-size:20px; color:var(--accent); opacity:.9 }
.name-tag input{ flex:1; border:0; outline:0; background:transparent; font-size:clamp(1.05rem,1.8vw,1.35rem); font-weight:700; color:var(--ink) }
.name-tag input::placeholder{ color:color-mix(in srgb, var(--ink), transparent 45%); font-weight:500 }

/* ---------- STEP 2–3 animated complementary background ---------- */


/* Make the sections a positioning context for ::before */
#step-2, #step-3 { position: relative; }

/* ---------- STEP 2–3 animated complementary background ---------- */

/* 1) Background drift on the pseudo-element */
#step-2::before,
#step-3::before{
  content:"";
  position:absolute; inset:0; z-index:0;
  background:
    radial-gradient(1200px 600px at 20% 20%, color-mix(in srgb, #6fa7c2, #f5f4f1 70%), transparent 60%),
    radial-gradient(900px 500px at 80% 80%, color-mix(in srgb, #5a6c91, #f5f4f1 80%), transparent 60%);
  animation: bgDriftPos 28s ease-in-out infinite alternate;
  pointer-events:none;
}

/* background-position animation (rename to avoid collision) */
@keyframes bgDriftPos{
  0%   { background-position: 0%   0%,   100% 100%; }
  100% { background-position: 10%  6%,    94%  92%; }
}

/* 2) Optional floating "blob" element that moves via transform */
.bg-drift{                      /* rename class to avoid confusion */
  position: absolute;
  width: 82vmax; height: 82vmax;
  border-radius: 50%;
  filter: blur(0px);
  opacity: .70;
  transform: translate(-50%, -50%);
  will-change: transform;
  z-index: 0;                   /* stays behind content; adjust if needed */
  animation: bgDriftTransform 8s ease-in-out infinite;
}

/* transform animation (rename so it doesn't override the other) */
@keyframes bgDriftTransform{
  0%   { transform: translate(-60%, -20%); }
  25%  { transform: translate(  0%, -60%); }
  50%  { transform: translate( 30%, -10%); }
  75%  { transform: translate(-10%,  20%); }
  100% { transform: translate(-60%, -20%); }
}


/* ---------- STEP 2 Phone ---------- */
.device.phone{
  --frame:3px; --radius:18px;
  position:relative; display:block; background:#0b0c10;
  border-radius:calc(var(--radius) + var(--frame));
  box-shadow:0 20px 50px rgba(0,0,0,.25), inset 0 0 0 1px rgba(255,255,255,.06);
  overflow:hidden;
}
.device.phone.tall{ width:clamp(260px,28vw,360px) }
.device.phone.tall::before{ content:""; display:block; padding-top:177.7778% } /* 9:16 ratio */
.device.phone .screen{ position:absolute; inset:var(--frame); border-radius:var(--radius); overflow:hidden; background:#fff; display:flex; flex-direction:column; box-shadow:inset 0 0 0 1px rgba(0,0,0,.06) }
.device.phone .notch{ position:absolute; top:calc(var(--frame)*.35); left:50%; transform:translateX(-50%); width:38%; height:12px; background:#000; border-radius:0 0 12px 12px; box-shadow:0 2px 6px rgba(0,0,0,.4); z-index:3; pointer-events:none }

.dm-banner{ flex:0 0 auto; padding:10px 12px; background:#f5f7fb; border-bottom:1px solid rgba(0,0,0,.06); font-weight:600; display:flex; align-items:center; gap:.5rem; }

/* Chat list stays fixed-height inside the screen and scrolls */
.chat-list{ flex:1 1 auto; overflow-y:auto; overscroll-behavior:contain; list-style:none; margin:0; padding:12px; display:flex; flex-direction:column; gap:10px }
.chat-item{ display:flex; opacity:1; transform:translateY(0); transition:opacity .35s ease, transform .35s ease }
.chat-item.hidden{ opacity:0; transform:translateY(8px) }
.chat-item.me{ justify-content:flex-end }

/* Bubbles with tails */
.chat-item .bubble{ position:relative; max-width:78%; background:linear-gradient(180deg,#ffffff,#fbfcff); border:1px solid rgba(0,0,0,.06); padding:10px 12px; border-radius:16px; box-shadow:0 1px 0 rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.04); color:#0f172a }
.chat-item .bubble::after{ content:""; position:absolute; left:-6px; bottom:8px; width:10px; height:10px; background:#ffffff; border-left:1px solid rgba(0,0,0,.06); border-bottom:1px solid rgba(0,0,0,.06); transform:rotate(45deg) }
.chat-item.me .bubble{ background:linear-gradient(180deg, color-mix(in srgb, #e9f2ff, white 10%), #e9f2ff); border-color:rgba(14,55,130,.12); box-shadow:0 1px 0 rgba(14,55,130,.05), 0 2px 8px rgba(14,55,130,.06) }
.chat-item.me .bubble::after{ left:auto; right:-6px; border-left:0; border-bottom:0; border-right:1px solid rgba(14,55,130,.12); border-top:1px solid rgba(14,55,130,.12); background:#e9f2ff }
.chat-item .bubble .meta{ display:block; margin-top:4px; font-size:.78rem; color:#677085 }

/* ---------- STEP 3 Story marquee ---------- */


 
@keyframes storiesSlide{ from{ transform: translateX(0) } to{ transform: translateX(-50%) } }
@media (prefers-reduced-motion: reduce){  }

/* ---------- Step 3 Heading visibility on mobile ---------- */
#step-3 .text-center{ position:relative; z-index:2 }
#step-3 h2.display-6{ color:var(--heading-color); }
@media (max-width:576px){
  #step-3 h2.display-6{ display:block !important; visibility:visible !important; opacity:1 !important; font-size:1.5rem; line-height:1.25 }
  #step-3 .text-center{ margin-bottom:.75rem }
}


/* --- Prevent horizontal scroll globally --- */
html, body, .snap-root{ overflow-x: hidden; }

/* --- Step 3 heading: force wrapping on small screens --- */
#step-3 h2.display-6{
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  max-width: min(92vw, 700px);
  margin-inline: auto;
  text-wrap: balance;
}

@media (max-width: 576px){
  #step-3 h2.display-6{
    font-size: 1.35rem;   /* slightly smaller for tight screens */
    line-height: 1.25;
  }
}



/* --- Constrained marquee (no page widening) --- */
.story-marquee{
  position: relative;
  overflow: hidden;
  height: 272px;                 /* explicit height to avoid collapse */
  max-width: 100%;
  contain: layout paint size;
  isolation: isolate;
  -webkit-overflow-scrolling: touch;
}
.story-marquee .viewport{
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.story-marquee .track{
  position: absolute;
  left: 0; top: 0;
  display: flex; gap: 16px;
  will-change: transform;
  animation: storiesSlide 28s linear infinite;
}
.story{
  display: flex; flex-direction: column; gap: 20px; text-decoration: none; color: #0f172a; min-width: 220px;
}
.story img{
  width: 220px; height: 224px; object-fit: cover; border-radius: 14px; box-shadow: 0 10px 28px rgba(0,0,0,.16);
}
.story span{ font-weight: 700; }

@keyframes storiesSlide{ from{ transform: translateX(0) } to{ transform: translateX(-50%) } }

/* Round avatar (image or initials) */
.chat-item .avatar{
  flex: 0 0 auto;
  width: 36px; height: 36px; border-radius: 50%;
  overflow: hidden; display: grid; place-items: center;
  font-weight: 800; font-size: .9rem; color: #fff;
  background: color-mix(in srgb, var(--accent-color, #917a5a), white 25%);
  box-shadow: 0 0 0 2px #fff, 0 1px 6px rgba(0,0,0,.12);
}
.chat-item .avatar img{
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.chat-item:not(.me) .avatar{ margin-right: 8px; }
.chat-item.me .avatar{ order: 2; margin-left: 8px; margin-right: 0; }
.chat-item .bubble{ max-width: 72%; }
@media (max-width: 576px){
  .chat-item .avatar{ width: 32px; height: 32px; font-size: .85rem; }
  .chat-item .bubble{ max-width: 75%; }
}

.step{ position: relative; }                 /* ensure parent is a positioning context */
.bg.media{
  position: absolute; inset: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  z-index: 0;
}
.overlay{                                     /* optional darkening layer */
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.35));
  z-index: 1;
}
.step .container{ position: relative; z-index: 2; }  /* content above bg/overlay */

/* Background media (image scenes) */
.scene .bg.media{ position:absolute; inset:0; background-size: cover; background-position: center; will-change: transform; filter: saturate(1.05); animation: verticalDrift 22s ease-in-out infinite; }
.scene .bg.media.media-hero{ background-position: center 35%; }
@keyframes verticalDrift{ 0%{ transform: translateY(0);} 50%{ transform: translateY(-2%);} 100%{ transform: translateY(0);} }
@media (prefers-reduced-motion: reduce){ .scene .bg.media{ animation: none !important; } }


.name-tag{ position:relative }

/* Autocomplete dropdown */
.autocomplete{
  position:absolute; top:calc(100% + 8px); left:0;
  width:min(720px,100%); background: rgba(255,255,255,0.98);
  backdrop-filter: blur(6px);
  border:1px solid rgba(0,0,0,.08); border-radius:12px;
  box-shadow:0 18px 40px rgba(0,0,0,.18);
  padding:6px; z-index:60; display:none; transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease; opacity:0;
}
.autocomplete.open{ display:block; opacity:1; transform:translateY(0) }
.autocomplete .empty{ padding:10px 12px; color:#677085; font-size:.95rem }
.autocomplete a, .autocomplete button, .autocomplete .item{
  display:flex; align-items:center; gap:10px; width:100%; text-align:left; padding:10px 12px;
  color:#212529; background:transparent; border:0; border-radius:10px; text-decoration:none; cursor:pointer;
}
.autocomplete a:hover, .autocomplete button:hover, .autocomplete .item:hover{
  background: color-mix(in srgb, var(--accent-color, #917a5a), white 88%);
}
.autocomplete .thumb{ flex:0 0 auto; width:36px; height:36px; border-radius:8px; object-fit:cover; background:#f2f2f2 }
.autocomplete .meta{ font-size:.88rem; color:#677085 }


/* Billboard overlay above video */
.step-name .image-wrap{ position:absolute; inset:0; overflow:hidden }
.step-name .image-wrap video{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0 }
.step-name .image-wrap::after{ content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.35)); z-index:1 }
.billboard-overlay{ position:absolute; inset:0; z-index:3; pointer-events:none; overflow:visible }
.bb-text{
     font-family: var(--heading-font );
    width:100%; 
    height:100%; 
    display:grid;
    place-items:center; 
    color:#fff; 
    font-weight:800;
    font-size:clamp(3.4rem,4vw,3rem);
    text-shadow:0 1px 3px rgba(0,0,0,.35), 0 10px 24px rgba(0,0,0,.25)
}







/* Tablet shell */
.device.tablet{
  position: relative;
  width: clamp(400px, 50vw, 640px);
  aspect-ratio: 16 / 9;       /* was 3 / 2 */
  border-radius: 24px;
  background: #0b0c10;
  box-shadow: 0 10px 40px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.08);
  overflow: hidden;

  /* nice gap from text above (if you prefer CSS over the <div class="pt-..."> spacer) */
  margin-top: clamp(12px, 3vw, 28px);
}

/* Center video inside; choose one: cover or contain */
.device.tablet video{
  width: 100%;
  height: 100%;
  object-fit: cover;   /* fills tablet; switch to 'contain' for full video without crop */
  display: block;
  border-radius: inherit;
}

/* Entrance animation (optional) */
.device.tablet{
  transform: translateX(12%) scale(.975);
  opacity: 0;
  transition: transform .6s ease, opacity .6s ease;
}
.device.tablet.entering{
  transform: translateX(0) scale(1);
  opacity: 1;
}
/* default: show whole video (no crop) */
.device.tablet video{
  width: 100%;
  height: 100%;
  object-fit: contain;        /* <-- no cropping */
  object-position: center;
  background: #000;           /* bars behind the video */
  display: block;
  border-radius: inherit;
}


@media (min-width: 768px){
  .device.tablet{ aspect-ratio: 16 / 9; }
  .device.tablet video{ object-fit: cover; background: transparent; }
}






