/* ==========================================================================
   Variables
   ========================================================================== */
:root {
  --color-primary: #a70e04;
  --color-primary-dark: #8a0b03;
  --color-nav: #1a1a2e;
  --color-text: #4a4a5a;
  --color-heading: #1a1a2e;
  --color-bg: #f5f5f7;
  --color-card: #ffffff;
  --color-accent: #2563eb;
  --color-border: #e5e5ea;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --max-w: 1140px;
  --max-w-narrow: 850px;
  --radius: 10px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font: inherit; }

/* ==========================================================================
   Base
   ========================================================================== */
body {
  font-family: var(--font);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--color-heading); line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.5rem, 1.25rem + 1.25vw, 2rem); margin-top: 2rem; margin-bottom: 0.75rem; }
h3 { font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem); margin-bottom: 0.5rem; }

p { margin-bottom: 0.75rem; }
ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 0.5rem; }
b, strong { color: var(--color-heading); }
hr { border: none; height: 1px; background: var(--color-border); margin: 2.5rem 0; }

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

/* ==========================================================================
   Layout
   ========================================================================== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

.page-content {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}
.page-content.full-width {
  max-width: none;
  padding: 0;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-nav);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.nav-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo img { height: 64px; width: auto; }
.nav-logo { display: flex; align-items: center; }

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

.nav-links a {
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
  display: block;
}
.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

/* Products dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > a::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  margin-left: 6px;
  vertical-align: middle;
  border-top: 5px solid currentColor;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  padding: 0.5rem 0;
  z-index: 100;
  list-style: none;
  margin: 0;
}
.dropdown-menu a {
  color: var(--color-text);
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  border-radius: 0;
}
.dropdown-menu a:hover { color: var(--color-primary); background: var(--color-bg); }
.dropdown-menu .dropdown-divider {
  height: 1px;
  background: var(--color-border);
  margin: 0.35rem 0;
}
.nav-dropdown:hover .dropdown-menu { display: block; }

/* Hamburger */
.nav-toggle { display: none; }
.hamburger {
  display: none;
  cursor: pointer;
  width: 28px; height: 28px;
  position: relative;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 100%; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background: var(--color-nav);
  color: #fff;
  padding: 5rem 1.5rem;
  text-align: center;
}
.hero h1 { color: #fff; font-size: clamp(2.25rem, 1.75rem + 2.5vw, 3.25rem); margin-bottom: 1rem; }
.hero p { color: rgba(255,255,255,0.8); font-size: clamp(1.05rem, 1rem + 0.25vw, 1.2rem); max-width: 640px; margin: 0 auto 2rem; }
.hero .btn { font-size: 1.05rem; }

/* Product Hero (individual product pages) */
.product-hero {
  background: var(--color-nav);
  color: #fff;
  padding: 4rem 1.5rem;
  text-align: center;
}
.product-hero h1 { color: #fff; margin-bottom: 0.5rem; }
.product-hero .tagline { color: rgba(255,255,255,0.8); font-size: 1.15rem; margin-bottom: 1.5rem; }
.product-hero .product-icon { font-size: 2.5rem; margin-bottom: 1rem; color: rgba(255,255,255,0.9); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 0.7rem 1.75rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
  cursor: pointer;
  border: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }

.btn-accent { background: var(--color-accent); color: #fff; }
.btn-accent:hover { background: #1d4ed8; color: #fff; }

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
}
.btn-outline:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.1); }

.btn-sm { padding: 0.45rem 1.1rem; font-size: 0.85rem; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding: 4rem 1.5rem;
}
.section-alt { background: var(--color-card); }
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-header h2 { margin-top: 0; }
.section-header p { color: var(--color-text); max-width: 600px; margin: 0 auto; }

/* ==========================================================================
   Product Cards
   ========================================================================== */
.product-grid {
  display: grid;
  gap: 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.product-grid.flagship { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.product-grid.utilities { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.product-card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.product-card .card-icon {
  font-size: 1.75rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}
.product-card h3 { margin-top: 0; }
.product-card h3 a { color: var(--color-heading); }
.product-card h3 a:hover { color: var(--color-primary); }
.product-card p { flex: 1; color: var(--color-text); font-size: 0.95rem; }
.product-card .card-link {
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   Product Page
   ========================================================================== */
.product-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.feature-item {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.feature-item i { font-size: 1.5rem; color: var(--color-primary); margin-bottom: 0.75rem; display: block; }
.feature-item h4 { margin-bottom: 0.5rem; }
.feature-item p { font-size: 0.9rem; margin-bottom: 0; }

.steps { counter-reset: step; list-style: none; padding: 0; max-width: 700px; }
.steps li {
  counter-increment: step;
  padding: 1rem 1rem 1rem 3.5rem;
  position: relative;
  margin-bottom: 1rem;
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1rem; top: 1rem;
  width: 2rem; height: 2rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.product-screenshot {
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  text-align: center;
}
.product-screenshot img { border-radius: 6px; }
.product-screenshot .placeholder {
  background: var(--color-bg);
  border: 2px dashed var(--color-border);
  border-radius: 6px;
  padding: 4rem 2rem;
  color: #999;
  font-size: 0.9rem;
}

.product-cta {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--color-bg);
}
.product-cta h2 { margin-top: 0; }

.related-products {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.related-products h2 { text-align: center; margin-top: 0; margin-bottom: 1.5rem; }

/* ==========================================================================
   Open Source Section
   ========================================================================== */
.oss-list {
  list-style: none;
  padding: 0;
  max-width: 600px;
  margin: 0 auto;
}
.oss-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.oss-list li:last-child { border-bottom: none; }
.oss-list i { color: var(--color-text); }

/* ==========================================================================
   Contact / CTA section
   ========================================================================== */
.contact-section { text-align: center; }
.contact-section h2 { margin-top: 0; }

/* Podio form scoping */
.podio-form-wrap { max-width: 100%; margin: 1.5rem auto 0; text-align: left; }

/* ==========================================================================
   About page
   ========================================================================== */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--color-primary);
  border-radius: 3px;
}
.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 1.5rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem; top: 0.4rem;
  width: 13px; height: 13px;
  background: var(--color-primary);
  border-radius: 50%;
  border: 3px solid var(--color-bg);
  margin-left: -5px;
}
.timeline-item h3 { margin-bottom: 0.25rem; }
.timeline-item p { margin-bottom: 0; font-size: 0.95rem; }

.founder-section {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.value-item { text-align: center; padding: 1.5rem; }
.value-item i { font-size: 2rem; color: var(--color-primary); margin-bottom: 0.75rem; display: block; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--color-nav);
  color: rgba(255,255,255,0.7);
  padding: 3rem 1.5rem 1.5rem;
  font-size: 0.9rem;
}
.footer-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 1rem; margin-top: 0; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 0.85rem; }
.footer-col a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
  max-width: var(--max-w);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--color-nav);
    flex-direction: column;
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    gap: 0;
  }
  .nav-toggle:checked ~ .nav-links { display: flex; }
  .nav-toggle:checked ~ .hamburger span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav-toggle:checked ~ .hamburger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .hamburger span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  .nav-links a { padding: 0.75rem 1rem; }
  .nav-dropdown .dropdown-menu {
    position: static;
    box-shadow: none;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    margin: 0.25rem 0;
  }
  .nav-dropdown .dropdown-menu a { color: rgba(255,255,255,0.75); padding: 0.5rem 1.5rem; }
  .nav-dropdown .dropdown-menu a:hover { color: #fff; background: rgba(255,255,255,0.1); }
  /* always show dropdown on mobile */
  .nav-dropdown .dropdown-menu { display: block; }
  .nav-dropdown > a::after { display: none; }

  .hero { padding: 3rem 1.5rem; }
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .product-grid.flagship { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .page-content { padding: 1.5rem 1rem 3rem; }
  .section { padding: 2.5rem 1rem; }
  .product-card { padding: 1.5rem; }
}
