/* ==========================================================================
   hvh.institute — shared stylesheet
   ========================================================================== */

:root {
  --bg: #14141F;
  --bg-secondary: #0e0e16;
  --card: #242433;
  --border: #33333f;
  --pink: #D8146B;
  --pink-bright: #f0187a;
  --text: #f1f1f4;
  --text-secondary: #8a8a99;
  --font-display: "Rajdhani", sans-serif;
  --font-body: "Inter", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
}

footer {
  flex-shrink: 0;
}

img {
  max-width: 100%;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
}

::selection {
  background: rgba(216, 20, 107, 0.3);
}

:focus-visible {
  outline: 2px solid var(--pink-bright);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Angular HUD utilities
   ========================================================================== */

.clip-angular {
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.clip-angular-sm {
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.hud-corners {
  position: relative;
}

.hud-corners::before,
.hud-corners::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--pink-bright);
  opacity: 0.55;
  transition: opacity 250ms ease;
}

.hud-corners::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.hud-corners::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid;
  border-right: 2px solid;
}

.hud-corners:hover::before,
.hud-corners:hover::after {
  opacity: 1;
}

/* Navbar
   ========================================================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  border-bottom: 1px solid rgba(51, 51, 63, 0.7);
  background: rgba(20, 20, 31, 0.9);
  backdrop-filter: blur(6px);
}

.navbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.08em;
}

.navbar__logo-mark {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.navbar__links {
  display: none;
  align-items: center;
  gap: 28px;
}

.navbar__link {
  position: relative;
  padding-bottom: 4px;
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  transition: color 200ms ease;
}

.navbar__link:hover {
  color: var(--text);
}

.navbar__link.is-active {
  color: var(--text);
}

.navbar__link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: var(--pink);
}

.navbar__actions {
  display: none;
  align-items: center;
  gap: 12px;
}

.navbar__discord {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(216, 20, 107, 0.5);
  background: rgba(216, 20, 107, 0.1);
  color: var(--pink-bright);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 200ms ease;
}

.navbar__discord:hover {
  background: rgba(216, 20, 107, 0.2);
}

.navbar__auth {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: border-color 200ms ease;
}

.navbar__auth:hover {
  border-color: rgba(216, 20, 107, 0.5);
}

.navbar__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}

.navbar__mobile {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 16px;
}

.navbar__mobile.is-open {
  display: block;
  animation: fadeSlideUp 300ms ease;
}

.navbar__mobile-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.navbar__mobile-link {
  padding: 10px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}

.navbar__mobile-link.is-active {
  color: var(--pink-bright);
}

.navbar__mobile-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.navbar__mobile-actions a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--border);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (min-width: 1024px) {
  .navbar__links,
  .navbar__actions {
    display: flex;
  }
  .navbar__toggle,
  .navbar__mobile {
    display: none !important;
  }
}

/* PCB / circuit background
   ========================================================================== */

.circuit-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.circuit-bg svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.14;
}

.circuit-bg__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, var(--bg) 78%);
}

.trace {
  animation: pulseTrace 4s ease-in-out infinite;
}

/* Hero
   ========================================================================== */

.hero {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 64px;
  min-height: 100vh;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.hero__heading {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
}

.hero__brand {
  display: inline-block;
  background: var(--pink);
  color: #fff;
  padding: 2px 12px;
  text-transform: none;
}

.hero__subheading {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
}

.hero__description {
  max-width: 520px;
  margin: 24px auto 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.hero__actions {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

@media (min-width: 640px) {
  .hero__heading {
    font-size: 3.25rem;
  }
  .hero__actions {
    flex-direction: row;
  }
}

@media (min-width: 768px) {
  .hero__heading {
    font-size: 3.75rem;
  }
}

/* Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: none;
  transition: all 250ms ease;
}

.btn--primary {
  background: var(--pink);
  color: #fff;
}

.btn--primary:hover {
  background: var(--pink-bright);
  box-shadow: 0 0 24px rgba(240, 24, 122, 0.45);
}

.btn--secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid rgba(216, 20, 107, 0.4);
}

.btn--secondary:hover {
  border-color: var(--pink);
  background: rgba(216, 20, 107, 0.1);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Feature section
   ========================================================================== */

.section {
  position: relative;
  padding: 96px 0;
}

.section--alt {
  background: var(--bg-secondary);
}

.section__header {
  max-width: 480px;
  margin: 0 auto 56px;
  text-align: center;
}

.section__title {
  font-size: 1.5rem;
  font-weight: 700;
}

.section__subtitle {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: none;
  font-family: var(--font-body);
  letter-spacing: normal;
}

@media (min-width: 640px) {
  .section__title {
    font-size: 1.875rem;
  }
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  transition: transform 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(216, 20, 107, 0.4);
  box-shadow: 0 0 20px rgba(216, 20, 107, 0.15);
}

.feature-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(216, 20, 107, 0.1);
  border: 1px solid rgba(216, 20, 107, 0.3);
  color: var(--pink-bright);
}

.feature-card__title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.feature-card__desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
  text-transform: none;
  font-family: var(--font-body);
}

/* Reviews CTA (home page)
   ========================================================================== */

.reviews-cta {
  padding: 64px 0;
  text-align: center;
}

.reviews-cta__stars {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 16px;
}

.reviews-cta__text {
  max-width: 480px;
  margin: 0 auto 20px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Empty portal
   ========================================================================== */

.empty-portal {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
}

.empty-portal__panel {
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 40px;
  background: var(--card);
  border: 1px solid var(--border);
  text-align: center;
}

.empty-portal__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(216, 20, 107, 0.1);
  border: 1px solid rgba(216, 20, 107, 0.3);
  color: var(--pink-bright);
}

.empty-portal__title {
  font-size: 1.25rem;
  font-weight: 700;
}

.empty-portal__message {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
  text-transform: none;
  font-family: var(--font-body);
}

/* Auth pages
   ========================================================================== */

.auth-section {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  overflow: hidden;
}

.auth-panel {
  width: 100%;
  max-width: 380px;
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--border);
}

.auth-panel__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  text-align: center;
}

.auth-panel__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(216, 20, 107, 0.1);
  border: 1px solid rgba(216, 20, 107, 0.3);
  color: var(--pink-bright);
}

.auth-panel__title {
  font-size: 1.25rem;
  font-weight: 700;
}

.auth-panel__notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 24px;
  border: 1px solid rgba(216, 20, 107, 0.3);
  background: rgba(216, 20, 107, 0.1);
  color: var(--pink-bright);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-field label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.form-field input {
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.875rem;
  font-family: var(--font-body);
}

.form-field input::placeholder {
  color: rgba(138, 138, 153, 0.6);
}

.form-field input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-panel .btn {
  width: 100%;
  margin-top: 8px;
}

.auth-panel__forgot {
  display: block;
  margin-top: 16px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.auth-panel__forgot:hover {
  color: var(--text);
}

/* FAQ
   ========================================================================== */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border: 1px solid var(--border);
  background: var(--card);
}

.faq-item__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: transparent;
  border: none;
  color: var(--text);
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-body);
}

.faq-item__icon {
  flex-shrink: 0;
  color: var(--pink-bright);
  transition: transform 300ms ease;
}

.faq-item.is-open .faq-item__icon {
  transform: rotate(45deg);
}

.faq-item__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms ease;
}

.faq-item.is-open .faq-item__answer {
  grid-template-rows: 1fr;
}

.faq-item__answer-inner {
  overflow: hidden;
}

.faq-item__answer p {
  margin: 0;
  padding: 0 20px 16px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* TOS
   ========================================================================== */

.tos-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.tos-block {
  padding-left: 20px;
  border-left: 2px solid rgba(216, 20, 107, 0.4);
}

.tos-block h2 {
  font-size: 0.875rem;
  font-weight: 600;
}

.tos-block p {
  margin-top: 8px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
  text-transform: none;
  font-family: var(--font-body);
}

.page-header {
  text-align: center;
  margin-bottom: 48px;
}

.page-header__title {
  font-size: 1.5rem;
  font-weight: 700;
}

.page-header__meta {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: none;
  font-family: var(--font-body);
}

.page-section {
  position: relative;
  flex: 1;
  padding: 120px 24px 96px;
}

.page-section .container--narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
}

/* Footer
   ========================================================================== */

.footer {
  position: relative;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 48px 0;
}

.footer__top {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.footer__brand p {
  max-width: 280px;
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: none;
  font-family: var(--font-body);
}

.footer__nav-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}

.footer__nav-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 32px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.footer__nav-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.footer__nav-links a:hover {
  color: var(--text);
}

.footer__discord {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(216, 20, 107, 0.4);
  background: rgba(216, 20, 107, 0.1);
  color: var(--pink-bright);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer__discord:hover {
  background: rgba(216, 20, 107, 0.2);
}

.footer__bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

@media (min-width: 640px) {
  .footer__top {
    flex-direction: row;
    justify-content: space-between;
  }
  .footer__nav-links {
    flex-direction: column;
    display: flex;
  }
}

/* Scroll reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Keyframes
   ========================================================================== */

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseTrace {
  0%, 100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.8;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
