/* ==========================================================================
   SBERRY LLC - Design System & Stylesheet
   ========================================================================== */

/* Variables & Custom Properties */
:root {
  --color-bg-dark: #0A0A0C;
  --color-bg-card: rgba(22, 22, 26, 0.6);
  --color-bg-card-hover: rgba(30, 30, 38, 0.85);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(255, 107, 0, 0.4);
  
  --color-text-primary: #F3F4F6;
  --color-text-secondary: #9CA3AF;
  --color-text-muted: #6B7280;
  
  --color-accent: #FF6B00; /* Consistent Brand Orange */
  --color-accent-glow: rgba(255, 107, 0, 0.15);
  --color-accent-soft: rgba(255, 107, 0, 0.1);
  --color-accent-hover: #E05300;
  
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --container-max-width: 1100px;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-snappy: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  
  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  background-color: var(--color-bg-dark);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

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

/* Ambient Background Glows */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.4;
  mix-blend-mode: plus-lighter;
}
.glow-1 {
  top: -100px;
  right: -50px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
}
.glow-2 {
  top: 60vh;
  left: -150px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.12) 0%, rgba(0, 0, 0, 0) 75%);
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background-color: rgba(10, 10, 12, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text-primary);
}

.logo-text-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.logo-slogan {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  margin-top: 1px;
}

.logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

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

.nav-link {
  text-decoration: none;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-snappy);
}

.nav-link:hover {
  color: var(--color-accent);
}

.btn-secondary-nav {
  padding: 8px 16px;
  border-radius: 9999px;
  background-color: var(--color-accent-soft);
  border: 1px solid rgba(255, 107, 0, 0.2);
  color: var(--color-accent) !important;
  font-weight: 600;
}

.btn-secondary-nav:hover {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text-primary) !important;
}

/* Typography elements */
.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 9999px;
  background-color: var(--color-accent-soft);
  border: 1px solid rgba(255, 107, 0, 0.2);
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  font-weight: 300;
}

/* Hero Section */
.hero-section {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 80px;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  max-width: 800px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--color-text-primary) 30%, rgba(255, 255, 255, 0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--color-text-secondary);
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-block;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-text-primary);
  border: none;
  box-shadow: 0 4px 20px var(--color-accent-glow);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 107, 0, 0.3);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Products Section */
.products-section {
  padding: 100px 0;
  border-top: 1px solid var(--color-border);
}

.section-header {
  margin-bottom: 60px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.product-card {
  position: relative;
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
  text-decoration: none;
  color: inherit;
}

.product-card:hover {
  background-color: var(--color-bg-card-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 20px var(--color-accent-glow);
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.product-icon {
  font-size: 2rem;
}

.product-link {
  font-size: 0.8rem;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-snappy);
}

.product-link:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

.product-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 12px;
}

.product-description {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

.product-title a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-snappy);
}

.product-title a:hover {
  color: var(--color-accent);
}

.product-features {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.feature-tag {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  background-color: rgba(255, 255, 255, 0.03);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
}

/* Product Logos & Screenshots */
.product-logo-wrapper {
  display: flex;
  align-items: center;
  height: 48px;
  margin-bottom: 8px;
}

.product-card-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
}

.product-screenshot-wrapper {
  margin-top: 16px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background-color: rgba(0, 0, 0, 0.3);
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: var(--transition-smooth);
}

.product-card:hover .product-screenshot {
  transform: scale(1.03);
}

/* Ethos/About Section */
.about-section {
  padding: 100px 0;
  border-top: 1px solid var(--color-border);
  background: linear-gradient(180deg, var(--color-bg-dark) 0%, rgba(22, 22, 26, 0.4) 100%);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-visual {
  display: flex;
  justify-content: center;
}

/* Code visual block */
.visual-card {
  width: 100%;
  max-width: 480px;
  background-color: rgba(15, 15, 20, 0.85);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  overflow: hidden;
  font-family: monospace;
}

.visual-header {
  background-color: rgba(255,255,255,0.03);
  padding: 14px 20px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--color-border);
}

.visual-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot.red { background-color: #FF5F56; }
.dot.yellow { background-color: #FFBD2E; }
.dot.green { background-color: #27C93F; }

.visual-content {
  padding: 24px;
  font-size: 0.9rem;
  color: #A9B2C3;
  line-height: 1.7;
}

.code-line {
  display: block;
}

.keyword { color: #E06C75; }
.string { color: #98C379; }
.number { color: #D19A66; }
.comment { color: #5C6370; font-style: italic; }

.about-text-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.about-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 24px;
  line-height: 1.25;
}

.about-p {
  color: var(--color-text-secondary);
  font-size: 1rem;
  margin-bottom: 20px;
  font-weight: 300;
  line-height: 1.7;
}

/* Contact Section */
.contact-section {
  padding: 100px 0 140px 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.contact-box {
  max-width: 650px;
  margin: 0 auto;
}

.contact-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.contact-subtitle {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  margin-bottom: 48px;
  font-weight: 300;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  color: var(--color-text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.social-btn:hover {
  background-color: var(--color-bg-card-hover);
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--color-accent-glow);
}

.social-btn svg {
  color: var(--color-accent);
}

/* Footer Section */
.footer {
  border-top: 1px solid var(--color-border);
  background-color: #050507;
  padding: 40px 0;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

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

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

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-visual {
    order: 2;
  }
  .about-text-content {
    order: 1;
  }
}

@media (max-width: 600px) {
  .nav {
    gap: 16px;
  }
  .nav-link {
    font-size: 0.85rem;
  }
  .btn-secondary-nav {
    padding: 6px 12px;
  }
  .hero-section {
    padding-top: calc(var(--nav-height) + 40px);
    padding-bottom: 60px;
  }
  .section-title, .about-title, .contact-title {
    font-size: 1.8rem;
  }

  .product-card {
    padding: 24px;
    min-height: auto;
  }
}

/* ==========================================================================
   Scroll-Driven Animations & Reveal Effects
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    /* Keyframe definitions */
    @keyframes reveal-up {
      from {
        opacity: 0;
        transform: translateY(40px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    @keyframes reveal-scale {
      from {
        opacity: 0;
        scale: 0.9;
      }
      to {
        opacity: 1;
        scale: 1;
      }
    }

    /* Target specific components */
    .product-card {
      animation: reveal-up auto linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 30%;
    }
    
    .visual-card {
      animation: reveal-scale auto linear both;
      animation-timeline: view();
      animation-range: entry 15% cover 35%;
    }
    
    .about-text-content {
      animation: reveal-up auto linear both;
      animation-timeline: view();
      animation-range: entry 15% cover 35%;
    }
    
    .contact-box {
      animation: reveal-scale auto linear both;
      animation-timeline: view();
      animation-range: entry 20% cover 40%;
    }
  }
}
