/* =========================
   RESET + THEME
   ========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0b0b0c;
  --bg-soft: #111214;
  --panel: rgba(255, 255, 255, 0.03);
  --panel-strong: rgba(255, 255, 255, 0.05);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.78);
  --gold: #d4af37;
  --gold-soft: rgba(212, 175, 55, 0.18);
  --gold-border: rgba(212, 175, 55, 0.35);
  --white-border: rgba(255, 255, 255, 0.1);
  --max-width: 1100px;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  line-height: 1.15;
}

p {
  opacity: 0.85;
  margin: 0 0 1.4rem;
}

/* =========================
   SHARED SECTION LAYOUT
   ========================= */
.section-inner {
  width: min(92%, var(--max-width));
  margin: 0 auto;
}

.system-section,
.monitoring-section,
.book-entry-section,
.contact {
  position: relative;
  z-index: 10;
}

.system-section,
.monitoring-section,
.book-entry-section {
  padding: 88px 20px;
}

.system-section h2,
.monitoring-section h2,
.book-entry-section h2,
.contact h2,
.projects-header h1,
.project-card h2 {
  color: var(--gold);
}

.system-section p,
.monitoring-section p,
.book-entry-section p,
.project-card p,
.footer-inner p,
.contact p {
  color: var(--muted);
}

/* =========================
   HERO
   ========================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  padding: 140px 20px 100px;
}

.hero-content {
  position: relative;
  z-index: 4;
  max-width: 900px;
  padding: 1.5rem;
}

.hero-logo {
  width: 170px;
  max-width: 42vw;
  margin: 0 auto 1.2rem;
  opacity: 0.96;
  filter: drop-shadow(0 0 14px rgba(212, 175, 55, 0.25));
}

.brand {
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  opacity: 0.75;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 0.3rem 0 0.6rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  border-radius: 0.6rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  background: rgba(212, 175, 55, 0.12);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.08);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  position: relative;
  z-index: 5;
}

.btn-secondary {
  background: transparent;
}

/* =========================
   SCROLL INDICATOR
   ========================= */
.scroll-indicator {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
}

.scroll-indicator span {
  display: block;
  width: 22px;
  height: 22px;
  border-bottom: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  transform: rotate(45deg);
  animation: scrollPulse 1.6s infinite;
  opacity: 0.7;
}

@keyframes scrollPulse {
  0% {
    transform: translateY(0) rotate(45deg);
    opacity: 0.3;
  }
  50% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(10px) rotate(45deg);
    opacity: 0.3;
  }
}

/* =========================
   BACKGROUND (stars + crawl)
   ========================= */
.crawl-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.stars,
.stars2,
.stars3 {
  position: absolute;
  inset: -40%;
  background-repeat: repeat;
  animation: starMove linear infinite;
  pointer-events: none;
}

.stars {
  background-image: radial-gradient(1px 1px at 50% 50%, #fff 40%, transparent 41%);
  background-size: 500px 500px;
  opacity: 0.25;
  animation-duration: 160s;
}

.stars2 {
  background-image: radial-gradient(1px 1px at 20% 30%, #fff 40%, transparent 41%);
  background-size: 800px 800px;
  opacity: 0.15;
  animation-duration: 260s;
}

.stars3 {
  background-image: radial-gradient(2px 2px at 70% 80%, #fff 40%, transparent 41%);
  background-size: 1200px 1200px;
  opacity: 0.1;
  animation-duration: 360s;
}

@keyframes starMove {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(15%);
  }
}

.crawl-perspective {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 900px;
  transform: translateX(-50%) perspective(420px) rotateX(58deg);
  opacity: 0.6;
  pointer-events: none;
  overflow: hidden;
}

.crawl-text {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 18px;
  line-height: 1.5;
  color: var(--gold);
  text-shadow:
    0 0 20px rgba(212, 175, 55, 0.25),
    0 0 2px rgba(0, 0, 0, 0.6);
  animation: crawl 28s linear forwards;
  max-height: 200px;
  overflow: hidden;
  white-space: pre-wrap;
}

@keyframes crawl {
  from {
    transform: translateY(20%);
  }
  to {
    transform: translateY(-140%);
  }
}

.crawl-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0) 0%, #000 85%);
  pointer-events: none;
}

/* =========================
   LANGUAGE SWITCH
   ========================= */
.lang-switch {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  z-index: 1000;
}

.lang-btn {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.55);
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  opacity: 0.9;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.lang-btn.active {
  background: rgba(212, 175, 55, 0.18);
  border-color: rgba(212, 175, 55, 0.85);
  opacity: 1;
}

.lang-btn:hover {
  background: rgba(212, 175, 55, 0.18);
}

/* =========================
   SYSTEM / MONITORING SECTIONS
   ========================= */
.system-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.015));
  border-top: 1px solid var(--white-border);
  border-bottom: 1px solid rgba(212, 175, 55, 0.08);
}

.monitoring-section {
  background:
    linear-gradient(180deg, rgba(212, 175, 55, 0.03), rgba(255, 255, 255, 0.015));
  border-bottom: 1px solid var(--white-border);
}

.system-section h2,
.monitoring-section h2,
.book-entry-section h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin: 0 0 18px;
}

.system-section p,
.monitoring-section p {
  max-width: 820px;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

/* =========================
   BOOK ENTRY SECTION
   ========================= */
.book-entry-section {
  background: var(--bg);
  border-bottom: 1px solid var(--white-border);
}

.book-entry-intro,
.book-entry-section p {
  max-width: 850px;
}

.book-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 34px;
}

.book-entry-card {
  background: linear-gradient(180deg, var(--panel), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--gold-border);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.04);
}

.book-entry-card h3 {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 1.3rem;
}

.book-entry-card p {
  margin: 0 0 22px;
  color: var(--muted);
}

.book-entry-card .btn {
  min-width: 150px;
  text-align: center;
}

/* =========================
   CONTACT
   ========================= */
.contact {
  padding: 64px 16px;
  text-align: center;
}

.contact h2 {
  margin: 0 0 20px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.contact-email-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.contact-email {
  color: var(--gold);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.contact-email:hover {
  text-decoration: underline;
}

.contact-action {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  transition: all 0.2s ease;
}

.contact-action:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.65);
}

.sep {
  color: var(--gold);
  opacity: 0.35;
}

/* =========================
   FOOTER
   ========================= */
.site-footer {
  padding: 28px 20px 36px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.6;
}

.footer-inner p {
  margin: 0 0 6px;
}

.footer-inner a {
  color: inherit;
  text-decoration: none;
}

.footer-inner a:hover {
  text-decoration: underline;
}

/* =========================
   PROJECTS PAGE
   ========================= */
.projects-page {
  min-height: 100svh;
  padding: 40px 20px;
}

.projects-header {
  max-width: 900px;
  margin: 0 auto 40px auto;
}

.projects-header h1 {
  margin: 10px 0 0;
  text-align: left;
}

.back-link {
  display: inline-block;
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--gold);
}

.back-link:hover {
  text-decoration: underline;
}

.projects-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project-card {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.project-card h2 {
  margin: 0 0 12px;
}

.project-card p {
  margin: 0;
}

/* =========================
   MOBILE
   ========================= */
@media (max-width: 900px) {
  .book-entry-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: 110px 16px 140px;
  }

  .hero-logo {
    width: 180px;
    max-width: 60vw;
    margin-bottom: 1.3rem;
  }

  .crawl-perspective {
    width: 120%;
    bottom: -20px;
    opacity: 0.4;
  }

  .crawl-text {
    font-size: 16px;
    line-height: 1.55;
    max-height: 140px;
  }

  .hero-actions {
    gap: 10px;
  }

  .btn {
    width: 100%;
    max-width: 260px;
  }

  .system-section,
  .monitoring-section,
  .book-entry-section {
    padding: 64px 16px;
  }

  .projects-page {
    padding: 28px 16px;
  }

  .projects-header {
    margin-bottom: 28px;
  }

  .project-card {
    padding: 18px;
  }

  .book-entry-card {
    padding: 20px;
  }

  .contact {
    padding: 56px 16px;
  }

  .lang-switch {
    top: 14px;
    right: 14px;
  }
}

@media (max-width: 520px) {
  .brand {
    letter-spacing: 0.2em;
    font-size: 0.7rem;
  }

  h1 {
    font-size: clamp(1.9rem, 9vw, 2.6rem);
  }

  .system-section h2,
  .monitoring-section h2,
  .book-entry-section h2,
  .contact h2 {
    font-size: 1.5rem;
  }

  .contact-email-row {
    gap: 8px;
  }

  .sep {
    display: none;
  }

  .contact-action,
  .contact-email {
    width: 100%;
  }
}


.project-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.project-card-link:hover {
  border-color: rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.04);
}