@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap');

@font-face {
    font-family: 'Kerater';
    src: url('fonts/KeraterMedium-qKgq.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Reset margins and paddings */
html, body {
  
  margin: 0;
  padding: 0;
}

/* Ensure content layers over parallax */
.home {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;      /* stack content vertically */
  text-align: center;
  gap: 3rem;

  /* Parallax background */
  background-image: url('parallax.png');
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;

  /* Height and positioning */
  min-height: 100vh;
  width: 100%;
  position: relative;
  z-index: 1;
}

.home * {
  position: relative; /* ensures content sits above the background */
  z-index: 2;
}

/* Apply hover pop effect only to nav links (Home, Alphabet, Quiz, Practice) */
nav a {
  transition: transform 0.25s ease, color 0.25s ease;
  display: inline-block;
}

nav a:hover {
  transform: scale(1.15);
  color: #0066cc;
}

/* ✅ Apply hover pop only to navigation links */
.navbar-nav .nav-link:hover {
  transform: scale(1.15);
  color: #0066cc;
}

.navbar-brand .beyondwords {
    font-family: 'Kerater', sans-serif;
    font-size: 4rem;
    font-weight: normal;
    color: #ffffff;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.5);
    margin-left: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

.navbar-logo {
  height: 50px;
  width: auto;
  margin-right: 10px;
  vertical-align: middle;
}

.navbar-brand {
  display: flex;
  align-items: center;
  font-size: 3rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}
.navbar-brand:hover {
  color: #0066cc;
}

html {
    font-size: 62.5%;
}

body {
    width: 100%;
    height: 100vh;
    overflow-x: hidden;
    background-color: black;
    color: white;
    scroll-behavior: smooth;
}

/* CHANGE POSITION OF NAV BAR */

header {
  margin: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 1rem 9%;
  background-color: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease;

  border-top: 2px solid #0066cc;
}

/* Blurry acrylic effect when scrolled */
header.scrolled {
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border-top: 2px solid #0066cc;
  border-bottom: 2px solid #0066cc;
}

.logo {
    font-size: 3rem;
    color: #0066cc;
    font-weight: 800;
    cursor: pointer;
    transition: 0.5s ease;
}
.logo:hover {
    transform: scale(1.1);
}

nav a {
    font-size: 1.8rem;
    color: white;
    margin-left: 4rem;
    font-weight: bold;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
}
nav a:hover,
nav a.active {
    color: #0066cc;
    border-bottom: 3px solid #0066cc;
}

/* Nav underline only for links */
.navbar-nav .nav-link {
    font-size: 1.8rem;
    color: white;
    margin-left: 4rem;
    font-weight: bold;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #0066cc;
    border-bottom: 3px solid #0066cc;
}

/* Keep BeyondWords + logo clean */
.navbar-brand {
    text-decoration: none;
    border-bottom: none !important;
}

/* START LEARNING button */
.btn {
  display: block;
  margin: 20px auto;
  padding: 12px 30px;
  background-color: 441414;
  color: #fff;
  font-size: 1.5rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
  position: relative;
  z-index: 10;
  max-width: fit-content;
}

.btn:hover {
  background-color: #0056b3;
  transform: translateY(-3px);
}

.home-content .btn {
  margin-top: 5px;
  margin-left: auto;
  margin-right: auto;
  display: block;
  max-width: fit-content;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .home-content .btn {
    font-size: 1rem;
    padding: 10px 25px;
    margin-top: 20px;
  }
}
@media (max-width: 480px) {
  .home-content .btn {
    font-size: 0.9rem;
    padding: 8px 20px;
    margin-top: 15px;
  }
}

/* Mobile nav */
@media(max-width:995px){
    nav {
        position: absolute;
        display: none;
        top: 0;
        right: 0;
        width: 40%;
        border-left: 3px solid #0066cc;
        border-bottom: 3px solid #0066cc;
        border-bottom-left-radius: 2rem;
        padding: 1rem solid;
        background-color: #161616;
        border-top: 0.1rem solid rgba(0,0,0,0.1);
    }
    nav.active { display: block; }
    nav a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }
    nav a:hover,
    nav a.active {
        padding: 1rem;
        border-radius: 0.5rem;
        border-bottom: 0.5rem solid #0066cc;
    }
}

section {
    min-height: 100vh;
    padding: 5rem 9% 5rem;
}

.home {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
    background-color: #141414;
}

.home .home-content h1 {
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.3;
}
span { color: #0066cc; }
.home-content h3 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}
.home-content p { font-size: 1.6rem; }

.home-img { border-radius: 50%; }
.home-img img {
    position: relative;
    width: 32vw;
    border-radius: 50%;
    box-shadow: 0 0 25px solid #0066cc;
    cursor: pointer;
    transition: 0.2s linear;
}

/* Glowing animated button border */
.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background-color: #141414;
    border-radius: 4rem;
    font-size: 2rem;
    color: #0066cc;
    letter-spacing: 0.3rem;
    font-weight: 600;
    border: 2px solid #0066cc;
    transition: 0.3s ease;
    cursor: pointer;
}
.btn::before {
  content: "";
  background: linear-gradient(
    
    45deg,
    #0066ff, #c8efff, #03e2ff, #0044ff,
    #00FFD5, #002BFF, #4879d4, #070070
  );
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 600%;
  z-index: -1;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  filter: blur(8px);
  animation: glowing 40s linear infinite;
  transition: opacity .3s ease-in-out;
  border-radius: 10px;
  opacity: 0;
}
@keyframes glowing {
  0% { background-position: 0 0; }
  50% { background-position: 400% 0; }
  100% { background-position: 0 0; }
}
.btn:hover { background-color: #0056b3; transform: translateY(-3px); }
.btn:hover::before { opacity: 1; }
.btn:active { color: #000; font-weight: bold; transform: translateY(2px); }

/* Typing animation */
.typing-text {
    font-size: 34px;
    font-weight: 600;
    min-width: 280px;
}
.typing-text span { position: relative; }
.typing-text span::before {
    content: "To Learn";
    color: #0066cc;
    animation: words 20s infinite;
}
.typing-text span::after {
    content: "";
    background-color: #141414;
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px solid #141414;
    right: -8;
    animation: cursor 0.6s infinite;
}
@keyframes cursor { to { border-left: 3px solid #0066cc; } }
@keyframes words {
    0%, 20% { content: "Easy"; }
    21%, 40% { content: "By Us"; }
    41%, 60% { content: "For you"; }
}

/* Extra section with white boxes */
.extra-section {
  background-color: #141414;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 120px;
  padding: 80px 20px;
  flex-wrap: nowrap;
}

/* White boxes */
.extra-box {
  background: #ffffff;
  color: #000;
  max-width: 800px;
  width: 90%;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;

  /* Shadow effect */
  box-shadow: 
    0 6px 0 #b3b3b3,
    0 12px 0 #999999,
    0 5px 20px #cce6ff,
    0 25px 20px rgba(0,0,0,0.5);

  transform-origin: center center;

  /* horizontal offset */
  --tx: 0;
  transform: translateX(var(--tx)) scale(1);
}

/* Hover scale with offset */
.extra-box:hover {
  transform: translateX(var(--tx)) scale(1.05);
  box-shadow: 
    0 6px 0 #b3b3b3,
    0 12px 0 #999999,
    0 5px 30px #0066cc,
    0 25px 25px rgba(0,0,0,0.6);
}

/* Alignment utilities */
.extra-box.left   { align-self: flex-start; }
.extra-box.center { align-self: center; }
.extra-box.right  { align-self: flex-end; }

/* Horizontal nudges */
.extra-box.move-left  { --tx: -50px; }
.extra-box.move-right { --tx:  50px; }

/* First box spacing */
.extra-section .extra-box:first-of-type { margin-top: 180px; }
@media (max-width: 768px) {
  .extra-section .extra-box:first-of-type { margin-top: 0; }
  .extra-box {
    margin: 0 auto;
    max-width: 95%;
    --tx: 0;
    transform: scale(1);
  }
}

.extra-box h2 {
  font-size: 3rem;
  margin-bottom: 15px;
  color: #141414;
}
.extra-box p {
  font-size: 1.6rem;
  margin-bottom: 20px;
  line-height: 1.5;
  max-width: 90%;
}
.extra-box .btn { margin-top: 10px; }

/* Hover pop for words */
.hover-pop {
  display: inline-block;
  transition: transform 0.25s ease;
  cursor: default;
  color: #ffffff;
}
.hover-pop:hover {
  transform: scale(1.15);
  color: #48a4ff;
}

/* Blurry acrylic nav bar */
header.scrolled {
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Spacer section to add scroll height */
.spacer {
  min-height: 100vh;   /* fills one full screen height */
  padding: 5rem 9%;    /* matches index.html spacing */
}

/* Sliding underline effect for nav */
nav {
  position: relative;
  display: flex;
  gap: 3rem; /* adjust spacing */
}

nav .nav-link {
  position: relative;
  text-decoration: none;
  color: #fff;
  font-size: 1.8rem;
  font-weight: bold;
  padding: 10px 0;
  transition: color 0.3s ease;
}

nav .nav-link:hover {
  color: #0066cc;
}

/* Single underline that slides */
.nav-underline {
  position: absolute;
  bottom: 0;
  height: 3px;
  background-color: #0066cc;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* ===== Alphabet page — 3D layered cards behind the box ===== */
.alphabet-page .alphabet-section .alphabet-box{
  position: relative;
  background: #ffffff !important;
  border-radius: 12px;
  overflow: visible;                 /* lets the letter drift out */
  /* Copy of index.html's layered grey steps (always behind the box) */
  box-shadow:
    0 6px 0 #b3b3b3,
    0 12px 0 #999999,
    0 5px 25px #cce6ff,
    0 25px 20px rgba(0,0,0,0.5) !important;
  transition: transform .3s ease, box-shadow .3s ease;
}

/* Scale the card and keep the layer behind on hover */
.alphabet-page .alphabet-section .alphabet-box:hover{
  transform: translateY(-8px) scale(1.05);
  box-shadow:
    0 6px 0 #b3b3b3,
    0 12px 0 #999999,
    0 5px 35px #0066cc,
    0 25px 25px rgba(0,0,0,0.6) !important;
}

/* Make images adopt the rounded corners of the white card */
.alphabet-page .alphabet-section .alphabet-box .box-image{
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
}
.alphabet-page .alphabet-section .alphabet-box .box-image img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

/* Apply alphabetbg.png for quiz.html, keep dark background */
.quiz-page {
  background-color: #141414 !important;
}

.quiz-page .home {
  background-image: url('alphabetbg.png') !important;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-color: #141414 !important; /* fallback if image doesn’t load */
}

/* Disable glow effect for quiz buttons */
#startRecognition, 
#submitAnswer, 
#nextQuestion {
  box-shadow: none !important;
}

#startRecognition:hover, 
#submitAnswer:hover, 
#nextQuestion:hover {
  box-shadow: none !important;
}

#startRecognition::before, 
#submitAnswer::before, 
#nextQuestion::before {
  display: none !important;
}

/* Persistent glowing effect for START LEARNING button */
.btn-glow {
  background-color: #141414;
  color: #ffffff;
  position: relative;
  z-index: 10;
  box-shadow:
    0 8px 0 #202020,
    0 25px 20px rgba(0,0,0,0.5);
  text-shadow: 0 0 6px #ffffff, 0 0 12px #ffffff;
}

/* Glowing START LEARNING button styled like demo.html but with bigger text + rounded corners */
.demo-btn, 
.demo-btn:link, 
.demo-btn:visited {
  display: inline-block;
  padding: 12px 30px;           /* keep original padding from index */
  background-color: #202020;
  color: #ffffff;
  font-size: 1.5rem;            /* keep previous size from index */
  font-weight: bold;
  border: none;
  border-radius: 10px;          /* rounded corners */
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  margin-top: 20px;
  position: relative;
  z-index: 10;

  /* 3D shadow effect */
  box-shadow:
    0 8px 0 #141414,
    0 5px 20px rgba(0,0,0,0.5);

  /* Text glow */
  text-shadow: 0 0 6px #ffffff, 0 0 12px #ffffff;

  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.demo-btn:hover {
  background-color: #2a2a2a;
  transform: scale(1.05);
  box-shadow:
    0 6px 0 #202020,
    0 20px 15px rgba(0,0,0,0.5);
}

.demo-btn:active {
  background-color: #1a1a1a;
  color: #ccc;
  transform: translateY(4px) scale(0.98);
  box-shadow:
    0 2px 0 #202020,
    0 6px 5px rgba(0,0,0,0.4);
}

/* Persistent glowing edge */
.demo-btn::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 10px; /* keep rounded corners */
  background: linear-gradient(
    45deg,
    #0066ff, #c8efff, #03e2ff, #0044ff,
    #00FFD5, #002BFF, #4879d4, #1f15aa
  );
  background-size: 400%;
  filter: blur(8px);
  opacity: 0.4; /* always visible */
  z-index: -1;
  transition: opacity 0.3s ease-in-out;
  animation: glowing 40s linear infinite;
}

.demo-btn:hover::before {
  opacity: 1; /* brighter on hover */
}

/* === Prevent alphabet boxes from overlaying the navbar === */
header {
  z-index: 2000 !important; /* navbar always on top */
}

.alphabet-page .alphabet-section .alphabet-box,
.alphabet-page .alphabet-section .alphabet-box:hover,
.alphabet-page .alphabet-section .alphabet-box.magnified,
.alphabet-page .alphabet-section .alphabet-box .alphabet-letter,
.alphabet-page .alphabet-section .alphabet-box:hover .alphabet-letter {
  z-index: 10 !important; /* keep boxes interactive but always below navbar */
}
