/* ============================================
   BrainMax — styles.css
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #1F1C20;
  color: #ffffff;
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Fugaz One', cursive;
  line-height: 1.1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}


/* ============================================
   Hero — Full Page
   ============================================ */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 3rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4rem;
}

.hero-content {
  max-width: 650px;
  padding-bottom: 4rem;
  position: relative;
  z-index: 2;
}


/* --- Brand: Logo + Title --- */
.hero-brand {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.hero-logo {
  width: clamp(64px, 10vw, 96px);
  height: clamp(64px, 10vw, 96px);
}

.hero-title {
  font-size: clamp(4rem, 10vw, 8rem);
  letter-spacing: 0.02em;
  color: #ffffff;
  white-space: nowrap;
}


/* --- Italic Subheading --- */
.hero-subline {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  line-height: 1.3;
  color: #ffffff;
  margin-bottom: 2rem;
}

.hero-subline em {
  font-style: italic;
  font-weight: 400;
}


/* --- Description --- */
.hero-desc {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: #999;
  max-width: 500px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}


/* --- Email Form --- */
.signup-form {
  width: 100%;
  max-width: 520px;
}

.form-row {
  display: flex;
  gap: 0;
}

.form-row input[type="email"] {
  flex: 1;
  padding: 1rem 1.2rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-right: none;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  outline: none;
  min-width: 0;
  border-radius: 0;
}

.form-row input[type="email"]::placeholder {
  color: #666;
}

.form-row input[type="email"]:focus {
  border-color: rgba(255, 255, 255, 0.5);
}

/* Valid email glow */
.form-row input[type="email"].valid {
  border-color: #F4537B;
  box-shadow: 0 0 12px rgba(244, 83, 123, 0.2);
}

/* Invalid email shake */
.form-row input[type="email"].invalid {
  border-color: #ff4444;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

/* Checkmark indicator */
.form-check {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #F4537B;
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.form-check.show {
  opacity: 1;
}

.form-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
}

.form-input-wrap input[type="email"] {
  width: 100%;
  padding-right: 2.5rem;
}

.form-row button {
  padding: 1rem 2rem;
  background: #C92546;
  color: #fff;
  border: 1px solid #C92546;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s, box-shadow 0.3s, transform 0.15s;
  border-radius: 0;
}

.form-row button:hover {
  background: #F4537B;
  border-color: #F4537B;
  box-shadow: 0 0 20px rgba(244, 83, 123, 0.3);
}

.form-row button:active {
  transform: scale(0.98);
}

.form-row button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Success state */
.success-msg {
  font-family: 'Fugaz One', cursive;
  color: #F4537B;
  font-size: 1.2rem;
  animation: fadeUp 0.5s ease;
}

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

/* Error message */
.form-error {
  color: #ff4444;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  animation: fadeUp 0.3s ease;
}


/* ============================================
   Decorative Blocks
   ============================================ */
.hero-blocks {
  position: absolute;
  bottom: 0;
  right: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(135deg, transparent 0%, rgba(0,0,0,0.03) 25%, rgba(0,0,0,0.12) 45%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.7) 75%, rgba(0,0,0,1) 90%);
  mask-image: linear-gradient(135deg, transparent 0%, rgba(0,0,0,0.03) 25%, rgba(0,0,0,0.12) 45%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.7) 75%, rgba(0,0,0,1) 90%);
}

.block-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  width: clamp(300px, 45vw, 600px);
}

.block {
  aspect-ratio: 1;
  border-radius: 8px;
}

.block.empty {
  background: transparent;
}


/* ============================================
   Footer (inside hero)
   ============================================ */
.hero-footer {
  padding-top: 2rem;
  position: relative;
  z-index: 2;
}

.hero-footer span {
  font-size: 0.85rem;
  color: #555;
}


/* ============================================
   Responsive — Tablet
   ============================================ */
@media (max-width: 1024px) {
  #hero {
    padding: 2.5rem 3rem;
  }

  .hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
  }

  .block-grid {
    width: 300px;
  }
}


/* ============================================
   Responsive — Mobile
   ============================================ */
@media (max-width: 768px) {
  #hero {
    padding: 4rem 1.25rem 1.5rem;
    min-height: 100svh;
    justify-content: space-between;
  }

  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    flex: 1;
  }

  .hero-content {
    padding-bottom: 0;
    max-width: 100%;
  }

  .hero-brand {
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .hero-logo {
    width: 44px;
    height: 44px;
  }

  .hero-title {
    font-size: clamp(2.5rem, 11vw, 3.5rem);
    white-space: normal;
  }

  .hero-subline {
    font-size: clamp(1.05rem, 3.8vw, 1.4rem);
    margin-bottom: 1rem;
  }

  .hero-desc {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
  }

  .signup-form {
    max-width: 100%;
  }

  .form-row {
    flex-direction: column;
  }

  .form-row input[type="email"] {
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-bottom: none;
    padding: 0.9rem 1rem;
    font-size: 1rem;
  }

  .form-row button {
    padding: 0.9rem 1rem;
    font-size: 0.9rem;
  }

  .hero-blocks {
    z-index: 1;
  }

  .block-grid {
    width: 180px;
    gap: 5px;
  }

  .hero-footer {
    padding-top: 1rem;
  }

  .hero-footer span {
    font-size: 0.75rem;
  }
}

@media (max-width: 390px) {
  #hero {
    padding: 3rem 1rem 1.25rem;
  }

  .hero-brand {
    gap: 0.5rem;
    margin-bottom: 1.25rem;
  }

  .hero-logo {
    width: 36px;
    height: 36px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subline {
    font-size: 1rem;
  }

  .hero-desc {
    font-size: 0.8rem;
  }

  .block-grid {
    width: 140px;
    gap: 4px;
  }
}
