/* ==============================
   irrationalways.com — Styles
   ============================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #09090b;
  --bg-alt: #0f0f13;
  --surface: #18181b;
  --surface-hover: #1f1f24;
  --border: #27272a;
  --border-light: #3f3f46;
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-subtle: rgba(99, 102, 241, 0.12);
  --gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1080px;
  --transition: 0.2s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--text);
}

img {
  max-width: 100%;
  display: block;
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: all 0.3s ease;
}

.nav.scrolled {
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.nav-logo:hover {
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover {
  color: var(--text);
}

.nav-icon-link {
  display: flex;
  align-items: center;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: all 0.3s ease;
}
.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: rgba(9, 9, 11, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  z-index: 99;
  flex-direction: column;
  gap: 12px;
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu a {
  color: var(--text-secondary);
  font-size: 1rem;
  padding: 8px 0;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

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

.hero-avatar {
  margin: 0 auto 28px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border);
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.15);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--accent-light);
  font-weight: 500;
  margin-bottom: 20px;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
}
.btn-primary:hover {
  color: #fff;
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-secondary:hover {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--border-light);
  transform: translateY(-1px);
}

/* --- Sections --- */
.section {
  padding: 100px 0;
}

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

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 48px;
}

/* --- Products --- */
.product-group {
  margin-bottom: 64px;
}
.product-group:last-child {
  margin-bottom: 0;
}

.product-group-header {
  margin-bottom: 28px;
}

.product-group-header h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.product-group-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 640px;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.badge-shipped {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-soon {
  background: rgba(234, 179, 8, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(234, 179, 8, 0.2);
}

.install-block {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
}

.install-block code {
  font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  color: var(--accent-light);
}

.install-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.product-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  color: var(--text);
}

.product-card:hover {
  border-color: var(--border-light);
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  color: var(--text);
}

.product-card-soon {
  opacity: 0.75;
}
.product-card-soon:hover {
  opacity: 1;
}

.product-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  color: var(--accent-light);
}

.product-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.product-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex-grow: 1;
  margin-bottom: 12px;
}

.product-tech {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.product-grid-compact {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* --- About --- */
.about-content {
  max-width: 720px;
}

.about-text {
  margin-bottom: 40px;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 1.02rem;
  margin-bottom: 16px;
  line-height: 1.7;
}

.about-text strong {
  color: var(--text);
}

.about-stats {
  display: flex;
  gap: 48px;
  margin-bottom: 40px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.tech-stack h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text-secondary);
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tags span {
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* --- Contact --- */
.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: all var(--transition);
}

.contact-card:hover {
  border-color: var(--border-light);
  background: var(--surface-hover);
  transform: translateY(-2px);
  color: var(--text);
}

.contact-card svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

.contact-card strong {
  display: block;
  font-size: 0.95rem;
}

.contact-card span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Footer --- */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .mobile-menu {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding: 120px 24px 60px;
  }

  .hero-avatar {
    width: 96px;
    height: 96px;
  }

  .section {
    padding: 64px 0;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .about-stats {
    gap: 24px;
    flex-wrap: wrap;
  }

  .stat-value {
    font-size: 1.8rem;
  }

  .install-block {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-grid-compact {
    grid-template-columns: 1fr;
  }

  .contact-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-description br {
    display: none;
  }

  .hero-links {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
  }
}
