*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-image: url('../img/paperbkgd.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    position: relative;
  }
  
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(
      circle at center,
      rgba(0,0,0,0) 50%,
      rgba(0,0,0,0.4) 100%
    );
  } 
  /* Fonts and typography */
  .trocchi-regular {
    font-family: "Trocchi", serif;
    font-weight: 400;
    font-style: normal;
  }
  
  body {
    font-family: 'Trocchi', sans-serif;
    color:#4c4230;
  }
  h1 {
    font-family: 'Trocchi', sans-serif;
    font-size: 2.5rem;
    font-weight: 400;
    color: #7a0455;
    letter-spacing: 0.05em;
    line-height: 1;
    text-align:center;
  }
  
  h2 {
    font-family: 'Trocchi', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #7a0455;
  }

  h3 {
    font-family: 'Trocchi', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #4c4230;
  }

  p {
    font-family: 'Trocchi', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #4c4230;
  }

/* Layout */

.container {
  max-width: 960px;
  padding: 0 1.5rem;
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
}

/* Section background layers */

.section-layer {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.section-content {
  position: relative;
  z-index: 2;
}

.section-layer::before {
  content: "";
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: translateZ(0);
  z-index: 0;
}

.section-layer::after,
.section-overlay {
  content: "";
  position: absolute;
  inset: 0;
  /*background: radial-gradient(circle at top, rgba(0, 0, 0, 0.55), transparent),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.9));*/
  z-index: 1;
}

/* Section background colors */

#section-2 {
  background-color: #001028; opacity: 0.9;
}

#section-4 {
  background-color: #4e0a39; opacity: 0.9;
}
#beta {
  background-color: #0e0601; opacity: 0.9;
}


/* Background images */

.bg-hero::before {
  background-image: url("../img/hero-bg.jpg");
}

.bg-what::before {
  background-image: url("../img/what-bg.jpg");
}

.bg-who::before {
  background-image: url("../img/who-bg.jpg");
}

.bg-how::before {
  background-image: url("../img/how-bg.jpg");
}

.bg-beta::before {
  background-image: url("../img/beta-bg.jpg");
}

/* Fixed vs scroll */

.bg-fixed::before {
  position: fixed;
}

.bg-scroll::before {
  position: absolute;
}

/* Section heading */

.section-heading {
  text-align: left;
  margin-top: 0;
  margin-bottom: 2rem;
  font-size: 2rem;
}

/* Hero */

.hero {
    position: relative;
    height: 100vh;
    min-height: 540px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  
  .hero-inner {
    position: relative;
    z-index: 3;
    padding: 0 1.5rem;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  

.hero-logo {
  height: 130px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  margin: 0 0 0.75rem;
  color: #7a0455;
}

.hero-tagline {
  font-size: 1.6rem;
  max-width: 40rem;
  margin: 0 auto 2rem;
  opacity: 0.95;
  text-align: justify;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: left;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.hero-subcopy {
  font-size: 0.95rem;
  max-width: 30rem;
  margin: 0 auto;
  opacity: 0.85;
}


/* skull animations */
.skull-wrap {
    position: fixed;
    z-index: 5;
    top: 20vh; /* vertical anchor for the skull */
    left: 50%;
    transform: translate(
        calc(-50% + var(--skull-x, 0px)),
        var(--skull-y, 0px)
      )
      rotate(var(--skull-rot, 0deg));
    pointer-events: none;
  }
  
  /* existing logo styling and idle float */
  .hero-logo {
    height: 64px;
    display: block;
    margin: 0 auto 1.5rem;
    image-rendering: auto;
    animation: skull-float 6s ease-in-out infinite;
  }
  
  @keyframes skull-float {
    0% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-8px);
    }
    100% {
      transform: translateY(0);
    }
  }
  .hero-logo-wide {
    height: auto;
    max-width: 600px;
    width: 100%;
    display: block;
    margin: 0 auto 1.5rem;
    image-rendering: auto;
    animation: skull-float 6s ease-in-out infinite;
  }
  
  /* Scroll arrow */
  .scroll-arrow {
    position: absolute;
    bottom: 1.75rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    text-decoration: none;
    cursor: pointer;
  }
  
  .scroll-arrow-icon {
    width: 24px;
    height: 24px;
    border-left: 2px solid rgba(245, 245, 245, 0.9);
    border-bottom: 2px solid rgba(245, 245, 245, 0.9);
    transform: rotate(-45deg);
    display: block;
    margin: 0 auto;
    animation: arrow-bob 1.8s ease-in-out infinite;
  }
  
  /* Small bobbing motion for the arrow */
  @keyframes arrow-bob {
    0% {
      transform: translateY(0) rotate(-45deg);
    }
    50% {
      transform: translateY(6px) rotate(-45deg);
    }
    100% {
      transform: translateY(0) rotate(-45deg);
    }
  }

  
/* Buttons */

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: #f5f5f5;
  color: #111;
}

.btn-primary:hover {
  filter: brightness(0.9);
}

.btn-secondary {
  background: transparent;
  color: #f5f5f5;
  border-color: rgba(245, 245, 245, 0.5);
}

.btn-secondary:hover {
  background: rgba(245, 245, 245, 0.12);
}

.btn-full {
  width: 100%;
}

/* Blocks and grids */

.block {
  background: rgba(5, 5, 10, 0.86);
  border-radius: 1.1rem;
  padding: 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
}

.block-main {
  margin-bottom: 1.5rem;
}
.block-main h1 {
  margin-bottom: 1.5rem;
  font-size:8rem;
}

.block-side {
  max-width: 360px;
}

@media (min-width: 900px) {
  .section-content {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr);
    gap: 2.5rem;
  }

  .block-main {
    margin-bottom: 0;
  }
}

/* Cards */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.8rem;
  margin-top: 1.5rem;
}

.card {
  padding: 1.8rem;
  border-radius: 1rem;
  background: rgba(5, 5, 12, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}

.card h3 {
  margin-top: 0;
}

/* Steps */

.steps {
  display: grid;
  gap: 1.6rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.step {
  position: relative;
  padding: 1.6rem 1.4rem 1.4rem;
  border-radius: 1rem;
  background: rgba(252, 252, 255, 0.94);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #111;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: #111;
  color: #f5f5f5;
  margin-bottom: 0.8rem;
}

/* Beta */

.beta {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .beta {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: start;
  }
}

.beta-list {
  list-style: none;
  padding-left: 0;
  margin: 1.2rem 0 0;
}

.beta-list li + li {
  margin-top: 0.3rem;
}

.beta-form {
  padding: 1.8rem;
  border-radius: 1rem;
  /* background: rgba(5, 5, 12, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px); */
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.field span {
  opacity: 0.9;
}

input,
textarea {
  font: inherit;
  padding: 0.7rem 0.8rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(5, 5, 12, 0.96);
  color: #f5f5f5;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #f5f5f5;
}

textarea {
  resize: vertical;
}

.beta-note {
  margin-top: 0.8rem;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Footer */

.footer {
  background: #050509;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 0;
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  opacity: 0.8;
}

/* Reveal animations */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}

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

/* Motion safety */

@media (prefers-reduced-motion: reduce) {
  [data-parallax] {
    transform: none !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* --------------------------
   RESPONSIVE ADJUSTMENTS
   -------------------------- */

/* Large tablets / small desktops */
@media (max-width: 1024px) {
  .container {
    max-width: 880px;
    padding: 0 1.25rem;
  }

  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .hero-logo {
    height: 110px;
  }

  .hero-tagline {
    font-size: 1.4rem;
    max-width: 36rem;
  }

  .section {
    padding: 4.2rem 1.5rem;
  }

  .skull-wrap {
    top: 18vh;
  }

  .block-main h1 {
    font-size: 4.5rem;
  }
}

/* Tablets and large phones */
@media (max-width: 768px) {
  .container {
    max-width: 720px;
    padding: 0 1rem;
  }

  body {
    font-size: 16px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .hero-logo {
    height: 96px;
  }

  .hero-logo-wide {
    max-width: 400px;
  }

  .hero-tagline {
    font-size: 1.2rem;
    text-align: center;
    max-width: 30rem;
  }

  .hero-cta {
    justify-content: center;
  }

  .section {
    padding: 3.2rem 1rem;
    min-height: 70vh;
  }

  .section-content {
    grid-template-columns: 1fr; /* stack columns */
  }

  .block-side {
    max-width: 100%;
    margin-top: 1rem;
  }

  .skull-wrap {
    top: 16vh;
    /* reduce movement range visually by scaling down the CSS var if present */
    will-change: transform;
  }

  .block-main h1 {
    font-size: 3rem;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  /* Background performance: avoid fixed attachment on small screens */
  .bg-fixed::before {
    position: absolute;
    background-attachment: scroll;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .container {
    max-width: 100%;
    padding: 0 0.75rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  h3 {
    font-size: 1rem;
  }

  p {
    font-size: 0.95rem;
  }

  .hero-logo {
    height: 80px;
  }

  .hero-logo-wide {
    max-width: 320px;
    margin-bottom: 1rem;
  }

  .hero-tagline {
    font-size: 1rem;
    max-width: 22rem;
    text-align: center;
    line-height: 1.5;
  }

  .hero-inner {
    padding: 0 0.75rem;
  }

  .section {
    padding: 2.4rem 0.75rem;
    min-height: 60vh;
  }

  .block-main h1 {
    font-size: 2rem;
  }

  .skull-wrap {
    top: 12vh;
    left: 50%;
    transform: translate(calc(-50% + var(--skull-x, 0px)), var(--skull-y, 0px)) rotate(var(--skull-rot, 0deg)) scale(var(--skull-scale, 1));
    /* make sure the skull doesn't block touch events on small screens */
    pointer-events: none;
  }

  /* make interactive elements large enough to tap */
  .btn-primary, .btn-secondary {
    padding: 0.9rem 1.1rem;
    font-size: 0.95rem;
  }

  .scroll-arrow {
    display: none; /* save vertical space on tiny screens */
  }

  /* reduce heavy backdrop-filter on low power devices */
  .block, .card, .beta-form {
    backdrop-filter: none;
    background: rgba(5,5,10,0.0);
  }

  /* avoid parallax transforms on very small screens for performance */
  [data-parallax] { transform: none !important; }
}

/* Landscape phones and small tablets: tighten spacing */
@media (min-width: 481px) and (max-width: 667px) {
  .hero-logo {
    width: 50%;
  }

  .section {
    padding: 4rem 1rem;
  }
}

/* Extra responsive helpers */

/* Make hero content breathe on very wide screens */
@media (min-width: 1400px) {
  .container {
    max-width: 1180px;
  }

  .hero-inner {
    max-width: 880px;
  }

  .hero-logo {
    height: 160px;
  }
}

/* Reduce motion preference respect */
@media (prefers-reduced-motion: reduce) {
  .hero-logo,
  .scroll-arrow-icon {
    animation: none !important;
  }

  .skull-wrap {
    transition: none !important;
  }
}
