/* ==========================================================================
   Zephtacore Layout & Developer-Grade Component System
   ========================================================================== */

/* Containers */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-sm {
  max-width: 860px;
}

/* ==========================================================================
   Site Header & Topbar Navigation (Fixed / No Wrapping Glitches)
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 68px;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  transition: background-color var(--transition-normal);
}

.nav-content {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.025em;
}

.brand-logo img {
  width: 32px;
  height: 32px;
  transition: transform var(--transition-normal);
}

.brand-logo:hover img {
  transform: rotate(6deg) scale(1.08);
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid var(--badge-border);
}

/* Nav Center Links */
.nav-center {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-center li a {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.nav-center li a:hover {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
}

.nav-center li a.active {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
  font-weight: 600;
}

/* Nav Right Action Items */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-cta-btn {
  background: var(--gradient-primary);
  color: #050811 !important;
  font-weight: 700 !important;
  padding: 0.48rem 1.1rem !important;
  border-radius: var(--radius-md) !important;
  font-size: 0.88rem !important;
  box-shadow: 0 4px 14px rgba(0, 242, 254, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4);
}

/* Minimalist Icon Theme Toggle */
.theme-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.theme-icon-btn:hover {
  color: var(--text-accent);
  border-color: var(--text-accent);
  background: var(--bg-input);
  transform: scale(1.05);
}

.theme-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Responsive topbar */
@media (max-width: 990px) {
  .nav-center {
    display: none; /* Hide center links on tablet/mobile or show drawer */
  }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-meta-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tag-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tag-cyan {
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--text-accent);
}

.tag-emerald {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--text-positive);
}

.tag-version {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.hero-title {
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin-bottom: 1.4rem;
}

.hero-title .gradient-cyan {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title .gradient-emerald {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2.25rem;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1.4rem;
  font-size: 0.94rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  text-decoration: none;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.btn-primary {
  background: var(--action-bg);
  color: var(--action-text);
}

.btn-primary:hover {
  background: var(--action-hover);
}

.btn-emerald {
  background: var(--gradient-accent);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.btn-emerald:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.btn-outline {
  background: var(--bg-surface);
  border-color: var(--border-card);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--text-accent);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.42rem 0.85rem;
  font-size: 0.84rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Custom Styled Form Controls (No Browser-Raw Select Glitches)
   ========================================================================== */
.form-group {
  margin-bottom: 1.35rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
  letter-spacing: -0.01em;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.4;
}

.form-control,
input[type="text"],
input[type="number"],
input[type="password"] {
  width: 100%;
  padding: 0.72rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  transition: all var(--transition-fast);
}

.form-control:focus,
input[type="text"]:focus,
input[type="number"]:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--focus-ring);
  background: var(--bg-input-focus);
}

/* Custom Styled Select with SVG Chevron Arrow */
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.15em;
  padding-right: 2.75rem;
  cursor: pointer;
}

/* Cards & Glassmorphism Surfaces */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 2.2vw, 1.65rem);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-card);
  box-shadow: var(--shadow-md);
}

.card-header {
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.22rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

.card-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
  line-height: 1.5;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

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

.section-header.text-left {
  text-align: left;
  margin: 0 0 2rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.65rem;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
  line-height: 1.2;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Code Snippet Box */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  overflow-x: auto;
  position: relative;
  margin: 1rem 0;
  color: var(--text-accent);
}

/* Site Footer */
.site-footer {
  margin-top: auto;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 0 2.5rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.15rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--text-accent);
}

.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}


/* ==========================================================================
   Universal Navigation Drawer & Menu Styles
   ========================================================================== */
.btn-open-menu {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-open-menu:hover {
  border-color: var(--text-accent);
  color: var(--text-accent);
  background: var(--bg-input);
  transform: translateY(-1px);
}

.nav-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.nav-drawer-backdrop.open {
  opacity: 1;
}

.nav-drawer-panel {
  width: 100%;
  max-width: 440px;
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-card);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-drawer-backdrop.open .nav-drawer-panel {
  transform: translateX(0);
}

.nav-drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-elevated);
}

.btn-drawer-close {
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.btn-drawer-close:hover {
  color: var(--brand-rose);
  border-color: var(--brand-rose);
  transform: rotate(90deg);
}

.nav-drawer-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.nav-drawer-group-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-accent);
  margin-bottom: 0.65rem;
}

.nav-drawer-link {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  text-decoration: none;
  transition: all var(--transition-fast);
  margin-bottom: 0.35rem;
}

.nav-drawer-link:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-card);
  text-decoration: none;
  transform: translateX(4px);
}

.nav-drawer-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.nav-drawer-link-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.nav-drawer-link-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
}
