/**
 * StarShed Main Stylesheet (Base, Typography, Layout & Navigation)
 * Inspired by Converta SaaS Theme (preview.codeless.co/converta/default/saas/)
 *
 * @package StarShed
 * @since 2.3.0
 */

@import url('variables.css');

/* CSS Reset & Modern Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-secondary);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Subtle Converta Mesh Atmosphere */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 600px;
  background: radial-gradient(ellipse 60% 50% at 50% -10%, rgba(133, 127, 255, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

#page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Typography — Converta Space Grotesk Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.4rem, 4.8vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); font-weight: 700; }
h3 { font-size: clamp(1.3rem, 2vw, 1.65rem); font-weight: 600; }
h4 { font-size: 1.2rem; font-weight: 600; }
h5 { font-size: 1.05rem; font-weight: 600; }
h6 { font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.06em; }

p {
  margin-bottom: 1.25rem;
}
p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--brand-primary-hover);
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Section Basics */
.section {
  padding: 5.5rem 0;
  position: relative;
  scroll-margin-top: 5rem;
}

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

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem;
}

/* Converta SaaS Pill Badges */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.15rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
  background: var(--brand-light);
  color: var(--brand-primary);
  border: 1px solid rgba(99, 102, 241, 0.22);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.06);
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.08rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 0;
}

/* Text Highlights */
.text-gradient-brand {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Buttons (Converta Pill Style) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  padding: 0.72rem 1.65rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand-primary);
  color: #ffffff !important;
  box-shadow: var(--shadow-pill);
}

.btn-primary:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.38);
}

.btn-outline {
  background: #ffffff;
  color: var(--text-main);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

.btn-video-play {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.65rem 1.4rem;
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  cursor: pointer;
}

.btn-video-play .play-icon-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.btn-video-play:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-video-play:hover .play-icon-circle {
  transform: scale(1.1);
}

.btn-sm {
  padding: 0.5rem 1.15rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 0.88rem 2rem;
  font-size: 1.02rem;
}

/* STICKY SITE HEADER (Converta Frosted Glass) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition-normal);
}

.site-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

/* Brand Link */
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-logo-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.brand-link:hover .brand-logo-icon {
  transform: scale(1.08) rotate(3deg);
  filter: drop-shadow(0 4px 10px rgba(79, 70, 229, 0.25));
}

.brand-text-block {
  display: flex;
  flex-direction: column;
  line-height: 1.14;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.38rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.brand-tagline {
  font-family: var(--font-sans);
  font-size: 0.64rem;
  font-weight: 750;
  color: var(--brand-primary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .brand-logo-icon {
    width: 40px;
    height: 40px;
  }
  .brand-name {
    font-size: 1.2rem;
  }
  .brand-tagline {
    font-size: 0.62rem;
  }
}

/* Primary Navigation - Modern SaaS Capsule Island */
@media (min-width: 992px) {
  .primary-nav {
    background: rgba(248, 250, 252, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.28rem 0.4rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(203, 213, 225, 0.85);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04), inset 0 1px 1px #ffffff;
    transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  }

  .site-header.is-scrolled .primary-nav {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(203, 213, 225, 0.95);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  }

  .primary-nav .nav-list {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .nav-link {
    font-family: var(--font-heading);
    font-size: 0.90rem;
    font-weight: 600;
    color: #334155;
    padding: 0.42rem 0.85rem;
    border-radius: var(--radius-full);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    text-decoration: none;
    letter-spacing: -0.012em;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
  }

  .nav-link::after {
    display: none !important;
  }

  .nav-link:hover {
    color: #0f172a;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    transform: translateY(-1px);
  }

  .nav-link.is-active::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4f46e5;
    margin-right: 6px;
    box-shadow: 0 0 6px rgba(79, 70, 229, 0.7);
    flex-shrink: 0;
  }

  .nav-link.is-active {
    color: var(--brand-primary);
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.14), 0 1px 2px rgba(79, 70, 229, 0.08);
    font-weight: 700;
  }
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-signin {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 0.4rem 0.6rem;
  transition: color var(--transition-fast);
}

.header-signin:hover {
  color: var(--brand-primary);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text-main);
}
