@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
}

/* Base layout */
body {
  font-family: 'Inter', sans-serif;
  padding: 40px;
  background: linear-gradient(to bottom, #f7f9fb, #fafafa);
  color: #222;
  margin: 0;
}

.topbar-logo {
  text-decoration: none;
  color: inherit;
}
.topbar-logo:link,
.topbar-logo:visited,
.topbar-logo:hover,
.topbar-logo:active {
  text-decoration: none;
  color: inherit;
}

.topbar-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Override ONLY the star row */
.star-row {
  align-self: center;   
}

/* Row 2: Astra + TM */
.text-row {
  display: flex;
  align-items: flex-start;
  margin-top: 2px;
}

/* Astra wrapper defines the centering width */
.astra-wrapper {
  display: flex;
  justify-content: center;
}

/* Astra text */
.topbar-text {
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  color: #0E385B;
}

/* TM */
.topbar-tm {
  font-size: 12px;
  opacity: 0.7;
  margin-left: 4px;
  position: relative;
  top: -2px;
  color: #0E385B;
}

/* Star sizing */
.topbar-star {
  width: 42px;
  height: 27px;
  position: relative;
}

.topbar-star .trail-layer,
.topbar-star .star-layer {
  width: 100%;
  height: 100%;
}



/* Centered containers for section titles */
.container {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

/* Hero section */
.hero {
  margin-top: 60px;
}

.astra-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.star-container {
  position: relative;
  width: 349px;
  height: 227px;
}

.trail-layer,
.star-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 349px;
  height: 227px;
}

.astra-text {
  margin-top: 248px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 32px;
  text-align: center;
}

/* Astra title */
.landing-title {
  font-size: 3rem;
  margin-bottom: 5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #0E385B;
}

/* TM styling */
.tm {
  font-size: 0.35em;
  vertical-align: super;
  margin-left: 4px;
  opacity: 0.7;
}

/* Patent Pending */
.status {
  margin-top: 5px;
  margin-bottom: 25px;
  color: #666;
  font-size: 0.9rem;
}

/* Tagline */
.tagline {
  font-size: 1.4rem;
  margin-top: 5px;
  margin-bottom: 25px;
  color: #333;
}

.section-header {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 40px auto 0;
  padding: 14px 30px;

  max-width: 800px;
  text-align: left;

  background: linear-gradient(
    135deg,
    rgba(14,56,91,0.25),
    rgba(14,56,91,0.45)
  );

  color: white;
  border: 1px solid rgba(14,56,91,0.35);
  border-radius: 8px 8px 0 0;

  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Soft content boxes */
.content-box {
  background: linear-gradient(
    135deg,
    rgba(14,56,91,0.08),
    rgba(255,255,255,0.95)
  );
  border: 1px solid rgba(14,56,91,0.15);
  border-top: none; /* <-- important */
  border-radius: 0 0 8px 8px;

  padding: 25px 30px;
  margin: 0 auto 40px;
  max-width: 800px;
  text-align: left;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}


.content-box p {
  margin: 18px 0;
  line-height: 1.7;
  color: #444;
  font-size: 1.15rem;
}

.content-box hr { 
  border: none; 
  height: 1px; 
  background: linear-gradient( 90deg, rgba(14,56,91,0.15), rgba(14,56,91,0.35), rgba(14,56,91,0.15) ); 
  margin: 32px 0; 
}

/* Why Astra Exists section */
.why-astra {
  margin-top: 80px;
}

.why-astra h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #0E385B;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  body {
    padding: 20px;
  }

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

  .tagline {
    font-size: 1.1rem;
  }

  .content-box {
    padding: 20px;
  }

  .content-box p {
    font-size: 1rem;
  }
}

/* Top Bar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f3f6f8; /* soft Astra-tinted solid */
  border-bottom: 1px solid rgba(14,56,91,0.15);
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}


/* Hamburger menu */
.hamburger {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  padding: 10px;
}

.hamburger span {
  height: 3px;
  width: 25px;
  background: #333;
  margin: 4px 0;
  border-radius: 2px;
}

/* Hidden checkbox */
.menu-toggle {
  display: none !important;
  visibility: hidden;
  position: absolute;
  left: -9999px;
}

/* Animated menu — FIXED to viewport */
.menu {
  position: sticky;
  top: 77px; /* height of your topbar */
  left: 0;
  right: 0;

  display: flex;
  flex-direction: column;
  background: #fff;
  border-bottom: 1px solid rgba(14,56,91,0.15);

  max-height: 0;
  opacity: 0;
  overflow-y: auto;     /* allow scrolling inside menu */
  padding: 0 20px;

  transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.25s ease;
  z-index: 999;         /* above everything else */
}



/* Menu links */
.menu a {
  text-decoration: none;
  color: #444;
  font-size: 1rem;
  padding: 10px 0;
}

.menu a:hover {
  color: #0E385B;
}

/* Toggle logic */
.menu-toggle:checked + .menu {
  max-height: 300px;
  opacity: 1;
  padding: 10px 20px;
}

/* RESPONSIVE DIVIDER */
.divider {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 60px;
  margin: 60px auto;
  overflow: visible;
}

/* TRAIL */
.trail {
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  width: 0;
  transform: translateY(-50%);
  background: linear-gradient(
    to right,
    rgba(14,56,91,0),
    rgba(14,56,91,0.6)
  );
  animation: trailGrow 2.2s ease-out forwards;
}

/* STAR */
.star {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%); /* stays constant */
  font-size: 22px;
  color: #0E385B;
  opacity: 0;
  animation:
    starMove 1.2s ease-out forwards,
    starTwinkle 1.4s ease-in-out 1.2s infinite;
}

@keyframes starMove {
  0%   { left: 0; opacity: 0; }
  100% { left: 50%; opacity: 1; }
}

/* TRAIL GROWS TO CENTER */
@keyframes trailGrow {
  0%   { width: 0; opacity: 1; }
  55%  { width: 50%; opacity: 0.6; }
  100% { width: 50%; opacity: 0; }
}

@keyframes starTwinkle {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50%  { transform: translate(-50%, -50%) scale(1.35); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* --- Code Blocks -------------------------------------------------------- */

pre {
  background: #0f0f11;          /* deep neutral black */
  border: 1px solid #2a2a2d;    /* subtle graphite border */
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  overflow-x: auto;
  margin: 1.6rem 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #e6e6e6;
  font-family: "JetBrains Mono", "Fira Code", monospace;
}

/* Optional: language label (if you wrap <pre> in a .code-block container) */
.code-block {
  position: relative;
}

.code-block[data-lang]::before {
  content: attr(data-lang);
  position: absolute;
  top: -0.75rem;
  right: 0.6rem;
  background: #1a1a1d;
  color: #9a9aa0;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- Inline Code -------------------------------------------------------- */

code {
  background: #1a1a1d;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #e0e0e6;
  font-family: "JetBrains Mono", "Fira Code", monospace;
}

/* Prevent inline <code> inside <pre> from double-styling */
pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
  font-size: inherit;
}

/* Article navigation */
.article-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid rgba(14,56,91,0.15);
  gap: 10px;
}

/* Alignment */
.article-nav .prev-link {
  justify-self: start;
}

.article-nav .index-link {
  justify-self: center;
}

.article-nav .next-link {
  justify-self: end;
}

/* Hide original text */
.article-nav .prev-link,
.article-nav .index-link,
.article-nav .next-link {
  font-size: 0;
  text-decoration: none !important; /* only affects nav links */
}

/* Labels only when element is a link */
.article-nav a.prev-link::before {
  content: "← Previous";
  font-size: 16px;
  color: #0E385B;
}

.article-nav a.next-link::after {
  content: "Next →";
  font-size: 16px;
  color: #0E385B;
}

/* Back to Foundations */
.article-nav .index-link::before {
  content: "[ Back to Foundations ]";
  font-size: 16px;
  color: #0E385B;
}

/* Mobile layout */
@media (max-width: 480px) {
  .article-nav {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .article-nav .prev-link,
  .article-nav .next-link {
    justify-self: center;
  }
}


/* Footer */
.footer {
  margin-top: 100px;
  padding: 30px 0;
  text-align: center;
  color: #666;
  font-size: 0.95rem;
  border-top: 1px solid rgba(14,56,91,0.15);
}

.footer-small {
  font-size: 0.8rem;
  color: #999;
  margin-top: 5px;
}

.footer {
  position: relative;
  margin-top: 40px;
  padding-top: 5px;
  border-top: 3px solid rgba(14,56,91,0.25);
}

.footer::before {
  content: "★";
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  background: #fafafa;
  padding: 0 4px;
  font-size: 30px;
  color: #0E385B;
  animation: breathe 2s ease-in-out infinite;
}

@keyframes breathe {
  0%   { opacity: 0.60; transform: translateX(-50%) scale(0.97); }
  50%  { opacity: 1;    transform: translateX(-50%) scale(1.03); }
  100% { opacity: 0.60; transform: translateX(-50%) scale(0.97); }
}


/* --- Ceremonial Animation --- */

/* Animation scaffolding */
.hidden {
  opacity: 0;
  pointer-events: none;
}

.astra-animation {
  position: relative;
  width: 100%;
  height: 60px;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  --diamond-center: calc(50% - 9px);
}

/* Diamonds */
.anim-diamond {
  width: 12px;
  height: 12px;
  background: #0E385B;
  transform: rotate(45deg);
  opacity: 0;
  position: absolute;
}

.anim-diamond.left {
  left: 5px;
}

.anim-diamond.right {
  right: 5px;
}

/* Trails */
.anim-trail-left,
.anim-trail-right {
  position: absolute;
  height: 2px;
  width: 0;
  opacity: 0;
}

.anim-trail-left {
  left: 5px;
  background: linear-gradient(
    to right,
    rgba(14,56,91,0),
    rgba(14,56,91,0.6)
  );
}

.anim-trail-right {
  right: 5px;
  transform-origin: right center;
  background: linear-gradient(
    to left,
    rgba(14,56,91,0),
    rgba(14,56,91,0.6)
  );
}

/* Burst */
.anim-burst {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14,56,91,0.4), rgba(14,56,91,0));
  opacity: 0;
}

/* Star (JS will move it) */
.anim-star {
  width: 18px;
  height: 18px;
  opacity: 0;
  position: absolute;
}

.anim-star svg {
  width: 100%;
  height: 100%;
  display: block;
}


/* Fade-out container */
.fade-out {
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

/* Ceremony triggers */
.topbar.astra-ceremony .anim-diamond.left { 
  animation: diamondLeft 1.8s ease-out forwards; 
}

.topbar.astra-ceremony .anim-diamond.right { 
  animation: diamondRight 1.8s ease-out forwards; 
}

.topbar.astra-ceremony .anim-trail-left { 
  animation: trailLeftGrow 1.6s ease-out forwards; 
}

.topbar.astra-ceremony .anim-trail-right {
  animation: trailRightGrow 1.6s ease-out forwards; 
}

.topbar.astra-ceremony .anim-burst {
  animation: burstCeremony 0.9s ease-out 1.22s forwards;
}

.topbar.astra-ceremony .anim-star {
  animation: starAppear 0.8s ease-out 1.4s forwards;
}

/* Diamonds glide inward */
@keyframes diamondLeft { 
  0%   { opacity: 0; left: 5px; } 
  30%  { opacity: 1; } 
  70%  { opacity: 1; left: calc(50% - 13px); } 
  100% { opacity: 0; left: calc(50% - 13px); } 
}

@keyframes diamondRight { 
  0%   { opacity: 0; right: 5px; } 
  30%  { opacity: 1; } 
  70%  { opacity: 1; right: calc(50% - 13px); } 
  100% { opacity: 0; right: calc(50% - 13px); } 
}

/* Trails grow inward */
@keyframes trailLeftGrow {
  0%      { width: 0; opacity: 0; }
  20%     { opacity: 0.6; }
  78.75%  { width: calc(50% - 3px); opacity: 0.6; }
  90%     { width: calc(50% - 3px); opacity: 0.3; }
  100%    { width: calc(50% - 3px); opacity: 0; }
}

@keyframes trailRightGrow {
  0%      { width: 0; opacity: 0; }
  20%     { opacity: 0.6; }
  78.75%  { width: calc(50% - 3px); opacity: 0.6; }
  90%     { width: calc(50% - 3px); opacity: 0.3; }
  100%    { width: calc(50% - 3px); opacity: 0; }
}

/* Burst */
@keyframes burstCeremony {
  0%   { opacity: 0; transform: scale(0.4); }
  40%  { opacity: 0.9; transform: scale(1.2); }
  100% { opacity: 0; transform: scale(1.6); }
}

/* Star appears (movement handled by JS) */
@keyframes starAppear {
  0%   { opacity: 0; transform: scale(0.4); }
  100% { opacity: 1; transform: scale(1); }
}
