/*
  styles.css
  Neon-on-dark, 80s arcade, Tron grid, pixel font, responsive, minimal
*/

:root {
  --neon-pink: #ff6cc2; /* #ff2fd6; */
  --neon-cyan: #00fff7;
  --dark-bg: #181828;
  --grid-line: rgba(0,255,247,0.12);
  --font-main: 'Press Start 2P', monospace;
  /* global pillar icon size (change here to affect all pillar icons) */
  --pillar-icon-size: 50px;
  /* logo sizing (max width as percentage of viewport width) */
  --logo-max-width: 30vw;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--dark-bg);
  color: var(--neon-cyan);
  font-family: var(--font-main);
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  /* Tron grid background */
  background:
    repeating-linear-gradient(0deg, var(--grid-line) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, var(--grid-line) 0 1px, transparent 1px 32px),
    var(--dark-bg);
}

/* HERO SECTION */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 1;
}
.hero-content {
  margin-top: 2rem;
  width: 100%;
}
.neon-logo {
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 4px var(--dark-bg));
  position: relative; /* container for glow pseudo-element */
  display: inline-block;
}

/* soft white glow behind the main logo */
.neon-logo::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 100%;
  transform: translate(-85%, -85%);
  /* scale relative to the logo container so it stays proportional */
  width: 140%;
  height: 140%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.25) 22%, rgba(255,255,255,0.04) 48%, rgba(255,255,255,0.02) 70%);
  filter: blur(30px);
  opacity: 0.68;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
}

/* make sure the image sits above the glow */
.neon-logo img.logo {
  position: relative;
  z-index: 1;
}
.headline {
  font-size: 2.2rem;
  color: var(--neon-cyan);
  text-shadow: 0 0 8px var(--neon-cyan), 0 0 24px var(--neon-pink);
  margin-bottom: 0.5rem;
}
.sub-headline {
  font-size: 1rem;
  color: #fff;
  text-shadow: 0 0 2px var(--neon-pink);
  margin-bottom: 2rem;
  align-items: center;
  align-self: center;
  display: flexbox ;
  justify-self: center;
}
.cta-btn {
  display: inline-block;
  background: var(--neon-pink);
  color: var(--dark-bg);
  border: none;
  font-family: var(--font-main);
  font-size: 1rem;
  padding: 1rem 2rem;
  border-radius: 8px;
  box-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan);
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
  outline: none;
  }

/* Rotating phrase (hero subtitle) */
.rotating-phrase {
  display: inline-block;
  perspective: 800px; /* enables 3D flip */
  transform-origin: center;
}
.rotating-phrase .word {
  display: inline-block;
  backface-visibility: hidden;
  transform-origin: center;
}
.rotating-phrase.enter {
  animation: flipIn 700ms ease forwards;
}
.rotating-phrase.leave {
  animation: flipOut 500ms ease forwards;
}

@keyframes flipIn {
  0% { transform: rotateX(90deg) translateY(8px); opacity: 0; }
  60% { transform: rotateX(-12deg) translateY(-4px); opacity: 1; }
  100% { transform: rotateX(0deg) translateY(0); opacity: 1; }
}
@keyframes flipOut {
  0% { transform: rotateX(0deg); opacity: 1; }
  100% { transform: rotateX(-90deg) translateY(-8px); opacity: 0; }
}
.cta-btn:hover, .cta-btn:focus {
  box-shadow: 0 0 32px var(--neon-cyan), 0 0 64px var(--neon-pink);
  transform: scale(1.05);
}
.hero-sub-headline {
  /* center the block so the UL can be centered within it */
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  font-size: 1rem;
  color: #d3effa;
  opacity: 0.85;
  line-height: 1.5;
  padding-left: 0; /* let the UL control its own padding */
  padding-top: 2rem;
  align-self: center;
}
.hero-sub-headline ul {
  /* make the list shrink-wrap and center itself while keeping its items left-aligned */
  display: inline-block;
  text-align: left;
  padding-left: 1.2em;
  margin: 0.5em auto 0 auto;
  list-style-position: outside;
}

.hero-sub-headline li {
  margin-bottom: 0.5em;
  list-style: disc;
}

/* FEATURES SECTION */
.features {
  padding: 3rem 1rem 2rem 1rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;

}
.features-title {
  color: var(--neon-cyan);
  font-size: 1.2rem;
  margin-bottom: 2rem;
  text-shadow: 0 0 8px var(--neon-pink);
}
.pillars {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  /* center pillars vertically so cards look balanced */
  align-items: center;
}
.pillar {
  background: rgba(24,24,40,0.85);
  border: 2px solid var(--neon-cyan);
  border-radius: 12px;
  /* remove outer padding so inner faces can span the full card */
  padding: 0;
  width: 120px;
  /* min-height: 140px; keep compact card height while allowing flip */
  box-shadow: 0 0 12px var(--neon-cyan);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.25s, border-color 0.25s, transform 0.35s;
  /* enable 3d space for inner flip */
  perspective: 900px;
  overflow: hidden; /* keep oversized content from spilling out */
}
.pillar:hover {
  box-shadow: 0 0 24px var(--neon-pink);
  border-color: var(--neon-pink);
}
.pillar-icon {
  margin-bottom: 0.7rem;
  filter: drop-shadow(0 0 8px var(--neon-cyan));
}
.pillar-icon img {
  /* size controlled from --pillar-icon-size */
  width: var(--pillar-icon-size);
  height: var(--pillar-icon-size);
  display: block; /* remove inline baseline gaps */
  max-width: 100%;
  object-fit: contain;
}

/* --- Flip card inner structure --- */
.pillar-inner {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 420ms cubic-bezier(.2,.8,.2,1);
  min-height: 100px; /* slightly reduced so back fits better */
  /* pivot from the bottom so the back appears to come up */
  transform-origin: center bottom;
}
.pillar-front,
.pillar-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px; /* match outer card so faces reach the same rounded edge */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 1rem; /* move spacing into the faces so they fill the full card */
  box-sizing: border-box;
}
.pillar-front {
  /* keep existing look on the front */
  background: transparent;
  color: var(--neon-cyan);
  /* ensure the front flips away around the bottom edge */
  transform-origin: center bottom;
}
.pillar-back {
  /* start flipped by rotating around the X axis so it sits hidden below */
  transform: rotateX(180deg);
  transform-origin: center bottom;
  /* tighter back padding so copy fits vertically */
  background: linear-gradient(180deg, rgba(0,255,247,0.04), rgba(255,108,194,0.03));
  border: 1px solid rgba(0,255,247,0.06);
  box-shadow: 0 8px 18px rgba(0,0,0,0.6), inset 0 0 10px rgba(0,255,247,0.02);
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  padding-left: 0;
  padding-right: 0;
}
.pillar-back-content {
  color: #dffbff;
  font-size: 0.62rem; /* slightly smaller to fit */
  text-align: center;
  line-height: 1.1;
  padding: 0 0;
  text-shadow: 0 0 6px rgba(0,255,247,0.12);
  /* Ensure text doesn't overflow the card */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  /* modern equivalent (non-prefixed) where supported */
  line-clamp: 3;
  /* wrap long words and keep layout */
  /* word-break: break-word; */
}

/* Trigger flip on hover or keyboard focus */
.pillar:hover .pillar-inner,
.pillar:focus .pillar-inner,
.pillar:focus-within .pillar-inner {
  transform: rotateX(180deg);
}

/* Make the pillar focusable and show focus outline for accessibility */
.pillar:focus {
  outline: none;
  box-shadow: 0 0 28px rgba(0,255,247,0.12), 0 0 12px var(--neon-pink);
  border-color: var(--neon-pink);
}

/* logo style controlled by CSS so responsive rules apply consistently */
.logo {
  max-width: var(--logo-max-width);
  height: auto;
  display: block;
  margin: 0 auto;
}
.pillar-label {
  color: var(--neon-cyan);
  font-size: 0.8rem;
  margin-top: 0.2rem;
  text-shadow: 0 0 4px var(--neon-cyan);
}

/* EMAIL SIGNUP SECTION */
.signup {
  padding: 3rem 1rem 2rem 1rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  align-items: center;
}
.signup h2 {
  color: var(--neon-cyan);
  margin-bottom: 2rem;
  text-shadow: 0 0 6px var(--neon-pink);
}
#signup-form {
  display: inline;
  max-width: 400px;
  align-self: center;
  justify-content: center;
  flex-direction: column;
  gap: 2rem;
}
#email {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 2px solid var(--neon-cyan);
  background: #22223a;
  color: var(--neon-cyan);
  font-family: var(--font-main);
  font-size: 1rem;
  outline: none;
  box-shadow: 0 0 8px var(--neon-cyan);
  transition: border-color 0.2s, box-shadow 0.2s;
}
#email:focus {
  border-color: var(--neon-pink);
  box-shadow: 0 0 16px var(--neon-pink);
}
.thank-you-message {
  color: var(--neon-cyan);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  min-height: 1.2em;
  text-shadow: 0 0 6px var(--neon-cyan);
}
.hidden-field {
  position: absolute;
  left: -5000px;
  opacity: 0;
}

/* CONTENT / LEGAL PAGES */
.content {
  max-width: 900px;
  margin: 2.25rem auto;
  padding: 0 1rem;
  box-sizing: border-box;
}
.legal {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.12));
  border: 1px solid rgba(0,255,247,0.08);
  border-left: 6px solid var(--neon-cyan);
  border-radius: 12px;
  padding: 1.75rem;
  color: #dffbff; /* slightly brighter for body text */
  text-align: left;
  line-height: 1.6;
  font-size: 0.95rem;
  box-shadow: 0 6px 24px rgba(0,0,0,0.6), 0 0 18px rgba(0,255,247,0.03) inset;
  /* use a readable sans for long legal copy while keeping the site font for headings */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  word-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}
.legal h2 {
  color: var(--neon-cyan);
  font-size: 1.05rem;
  margin: 0 0 0.6rem 0;
  text-shadow: 0 0 8px var(--neon-cyan);
}
.legal p {
  margin: 0 0 1rem 0;
}


/* FOOTER */
.footer {
  background: #181828;
  border-top: 2px solid var(--neon-cyan);
  text-align: center;
  padding: 1.5rem 1rem 1rem 1rem;
  margin-top: 2rem;
}
.footer nav {
  margin-bottom: 0.5rem;
}
.footer a {
  color: var(--neon-pink);
  text-decoration: none;
  margin: 0 1rem;
  font-size: 0.8rem;
  text-shadow: 0 0 4px var(--neon-pink);
  transition: color 0.2s;
}
.footer a:hover {
  color: var(--neon-cyan);
}
.footer-copy {
  color: var(--neon-cyan);
  font-size: 0.7rem;
  margin-top: 0.5rem;
  text-shadow: 0 0 4px var(--neon-cyan);
}

/* ANIMATIONS */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(.77,0,.18,1), transform 0.8s cubic-bezier(.77,0,.18,1);
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .pillars {
    flex-direction: row;
    gap: .5rem;
  }
  .pillar {
    width: 25%;
    max-width: 260px;
    margin: 0 auto;
  }
  .headline {
    font-size: 1.3rem;
  }
  .sub-headline {
    font-size: .8rem;
  }
  .features {
    padding: 2rem 0.5rem 1rem 0.5rem;
  }
  .signup {
    padding: 2rem 0.5rem 1rem 0.5rem;
  }
  .hero-sub-headline {
    max-width: 600px;
    /* keep the sub-headline readable on small screens */
    font-size: 0.8rem;
    line-height: 1.4;
    align-self: center;
    text-align: center;
    justify-content: center;
  }
  .hero-sub-headline ul {
    font-size: 0.8rem;
  }
  /* make the CTA smaller on narrow screens and keep padding from the viewport edges */
  .cta-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    max-width: calc(100% - 2rem);
    box-sizing: border-box;
    margin: 0.75rem auto;
    display: inline-block;
  }
  /* keep pillar icon size consistent with desktop for legibility */
  :root {
    --logo-max-width: 60vw; /* make the logo a bit larger proportionally on narrow screens */
  }

  /* Make flip-card back copy easier to read on small screens */
  .pillar-back-content {
    font-size: 0.45rem;
    line-height: 1.2;
    -webkit-line-clamp: 4; /* allow one more line on narrow widths */
    line-clamp: 4;
    padding: 0rem 0rem;
  }
  .pillar-label {
    font-size: 0.75rem;
  }
}
