/* ============================================================
   Somnex — Modern Tailwind-Inspired Styles
   ============================================================ */

:root {
  --grad-1: #e8884f;
  --grad-2: #d68468;
  --grad-3: #a97c8d;
  --grad-4: #6f7fa0;
  --grad-5: #4877a3;
  
  --text-gradient: #fffaf6;
  --text-gradient-soft: rgba(255, 250, 246, 0.78);
  --text-dark: #322823;
  --text-dark-bold: #1d1612;
  
  --panel-bg: rgba(255, 252, 248, 0.62);
  --panel-bg-strong: rgba(255, 252, 248, 0.8);
  --panel-border: rgba(255, 255, 255, 0.55);
  --footer-bg: rgba(255, 250, 245, 0.88);
  --footer-divider: rgba(58, 47, 41, 0.18);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Helios Extended', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(132deg,
    var(--grad-1) 0%,
    var(--grad-2) 24%,
    var(--grad-3) 48%,
    var(--grad-4) 72%,
    var(--grad-5) 100%);
  background-attachment: fixed;
  color: var(--text-gradient);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Helios Extended', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 200;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

h2 {
  font-size: 1.5rem;
  font-weight: 500;
}

h3 {
  font-size: 1.25rem;
  font-weight: 500;
}

p {
  line-height: 1.6;
  font-size: 1rem;
}

/* ============================================================
   STICKY NAVIGATION
   ============================================================ */

.sticky-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.18);
  background-attachment: fixed;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s ease-out;
  display: block;
}

.sticky-nav.visible {
  opacity: 1;
  pointer-events: auto;
  display: block;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  max-width: 100%;
  margin: 0;
}

.nav-logo {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-menu a {
  text-decoration: none;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #ffffff;
  transition: width 0.3s ease;
}

.nav-menu a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.nav-menu a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(132deg, var(--grad-1), var(--grad-5));
    flex-direction: column;
    gap: 0;
    padding: 1rem;
    display: none;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu a {
    padding: 1rem 0;
    border-bottom: 1px solid var(--panel-border);
  }

  .mobile-menu-btn {
    display: block;
  }
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  z-index: 10;
}

.hero-title {
  color: #ffffff;
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-gradient-soft);
  margin-bottom: 3rem;
  font-weight: 300;
  letter-spacing: 0.05em;
}

/* ============================================================
   BUTTONS & CTA
   ============================================================ */

.nav-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-buttons a {
  padding: 0.875rem 1.75rem;
  text-decoration: none;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-weight: 500;
  font-size: 1rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.nav-buttons a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.nav-buttons a:active {
  transform: translateY(-2px);
}

.cta-button {
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, var(--grad-2), var(--grad-4));
  color: var(--text-gradient);
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 4px 12px rgba(169, 124, 141, 0.3);
}

.cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(169, 124, 141, 0.5);
}

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

/* ============================================================
   PANELS & CARDS
   ============================================================ */

.panel {
  position: relative;
  z-index: 10;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(73, 144, 226, 0.22);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(60, 40, 30, 0.12);
  transition: all 0.4s ease;
}

.panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(60, 40, 30, 0.2);
}

.panel-strong {
  background-color: var(--panel-bg-strong);
}

.panel h2 {
  color: #ffffff;
  margin-bottom: 1rem;
  text-align: left;
}

.panel h3 {
  color: #ffffff;
  margin-bottom: 0.5rem;
  text-align: left;
}

.panel p {
  color: #ffffff;
  text-align: left;
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.7;
}

.panel p:last-child {
  margin-bottom: 0;
}

.about-tree {
  position: relative;
  max-width: 960px;
  margin: 2rem auto 0;
  padding: 1rem 0;
  background: transparent;
}

.about-tree::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.9));
  transform: translateX(-50%);
}

.about-tree-item {
  position: relative;
  display: flex;
  align-items: center;
  width: 50%;
  margin-bottom: 1.5rem;
}

.about-tree-item.left {
  justify-content: flex-end;
  margin-right: auto;
  padding-right: 1.5rem;
}

.about-tree-item.right {
  justify-content: flex-start;
  margin-left: 50%;
  padding-left: 1.5rem;
}

.about-tree-card {
  width: min(100%, 480px);
  padding: 1.25rem 1.4rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(73, 144, 226, 0.22);
  box-shadow: 0 10px 24px rgba(13, 28, 44, 0.12);
  backdrop-filter: blur(8px);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.about-tree-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(13, 28, 44, 0.18);
}

.about-tree-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  text-align: left;
}

.about-tree-card p {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .about-tree::before {
    left: 1rem;
  }

  .about-tree-item {
    justify-content: flex-start;
    padding-left: 2rem;
  }

  .about-tree-item::after {
    left: 1rem;
  }

  .about-tree-card {
    width: 100%;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer-nav {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
  padding: 2rem;
  background: var(--footer-bg);
  color: var(--text-dark);
  font-size: 0.9rem;
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--footer-divider);
}

.footer-column {
  padding: 0;
}

.footer-column h4 {
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-dark-bold);
  font-size: 1rem;
}

.footer-column ul {
  list-style: none;
  padding: 0;
}

.footer-column li {
  margin-bottom: 0.5rem;
}

.footer-column a {
  text-decoration: none;
  color: var(--text-dark);
  transition: color 0.2s ease;
  font-size: 0.95rem;
}

.footer-column a:hover {
  color: var(--text-dark-bold);
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */

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

.full-width {
  width: 100%;
}

.page-content {
  display: grid;
  grid-template-rows: auto repeat(auto, auto);
  gap: 2rem;
  padding: 2rem;
  padding-top: calc(2rem + 100px);
  align-items: start;
}

.page-header {
  position: relative;
  z-index: 10;
  margin-left: 2rem;
}

.page-header h1 {
  font-size: clamp(3rem, 12vw, 12.5vh);
  font-weight: 100;
  color: var(--text-gradient);
  text-align: left;
  line-height: 0.8;
  text-shadow: 0 2px 18px rgba(30, 20, 15, 0.3);
  margin: 0;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.8s ease-out;
}

.animate-slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

@media (max-width: 1024px) {
  .hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
  }

  .page-header h1 {
    font-size: clamp(2rem, 10vw, 8rem);
  }
}

@media (max-width: 768px) {
  .nav-buttons {
    gap: 1rem;
  }

  .nav-buttons a {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .footer-nav {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .page-content {
    padding: 1.5rem;
    padding-top: calc(1.5rem + 60px);
    gap: 1.5rem;
  }

  .page-header {
    margin-left: 1rem;
  }

  .page-header h1 {
    font-size: clamp(1.5rem, 8vw, 6rem);
  }

  .panel {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0 1rem;
  }

  h1 {
    font-size: 2.5rem;
  }

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

  .nav-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-buttons a {
    width: 100%;
    text-align: center;
  }

  .footer-nav {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  .footer-column {
    border-top: 1px solid var(--footer-divider);
    padding-top: 1rem;
  }

  .footer-column:first-child {
    border-top: none;
    padding-top: 0;
  }

  .page-content {
    padding: 1rem;
    padding-top: calc(1rem + 50px);
  }

  .page-header {
    margin-left: 0;
  }

  .page-header h1 {
    font-size: clamp(1.5rem, 6vw, 3rem);
  }

  .panel {
    padding: 1rem;
  }
}
