/* Terpz Website - Public Pages Styles */

:root {
  --primary: #10b981;
  --primary-dark: #059669;
  --secondary: #6366f1;
  --danger: #ef4444;
  --warning: #f59e0b;
  --dark: #1f2937;
  --darker: #111827;
  --darkest: #0a0f14;
  --light: #f3f4f6;
  --white: #ffffff;
  --gray: #6b7280;
  --gray-light: #9ca3af;
  --gray-dark: #374151;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--darkest);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
}

/* ============================================================================
   NAVIGATION
   ============================================================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 15, 20, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  height: 70px;
  overflow: visible;
}

.navbar.scrolled {
  background: rgba(10, 15, 20, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: 10px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo {
  width: 40px;
  height: 40px;
  color: var(--primary);
}

.nav-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.5px;
}

.nav-title span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--gray-light);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
}

.nav-cta {
  background: var(--primary);
  color: var(--white) !important;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
}

.nav-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Mobile Menu */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--darker);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    font-size: 1.1rem;
  }
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 6rem 2rem 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
}

.hero-glow-1 {
  width: 600px;
  height: 600px;
  background: var(--primary);
  top: -200px;
  right: -100px;
}

.hero-glow-2 {
  width: 500px;
  height: 500px;
  background: var(--secondary);
  bottom: -150px;
  left: -100px;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 30px) scale(1.02); }
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero-content h1 span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--gray-light);
  margin-bottom: 2rem;
  max-width: 500px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--gray-dark);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.hero-image {
  position: relative;
}

.hero-mockup {
  width: 100%;
  max-width: 550px;
  border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-dark);
}

.stat {
  text-align: left;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--gray);
}

@media (max-width: 968px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image {
    order: -1;
  }

  .hero-mockup {
    max-width: 400px;
    margin: 0 auto;
  }

  .hero-stats {
    justify-content: center;
  }
}

/* ============================================================================
   FEATURES SECTION
   ============================================================================ */

.features {
  padding: 6rem 2rem;
  background: var(--darker);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--gray-light);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--dark);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  color: var(--white);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--gray-light);
  font-size: 0.95rem;
}

/* ============================================================================
   INTEGRATIONS SECTION
   ============================================================================ */

.integrations {
  padding: 6rem 2rem;
  background: var(--darkest);
}

.integrations-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  flex-wrap: wrap;
  margin-top: 3rem;
}

.integration-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 2rem;
  background: var(--darker);
  border-radius: 12px;
  border: 1px solid var(--gray-dark);
  transition: all 0.3s;
}

.integration-logo:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.integration-logo span {
  font-weight: 600;
  color: var(--gray-light);
}

/* ============================================================================
   CTA SECTION
   ============================================================================ */

.cta {
  padding: 6rem 2rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
  text-align: center;
}

.cta h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta p {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta .btn {
  background: var(--white);
  color: var(--primary-dark);
}

.cta .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
  padding: 4rem 2rem 2rem;
  background: var(--darker);
  border-top: 1px solid var(--gray-dark);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--gray-light);
  margin-top: 1rem;
  max-width: 300px;
}

.footer-column h4 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray);
  margin-bottom: 1rem;
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: 0.5rem;
}

.footer-column a {
  color: var(--gray-light);
  font-size: 0.95rem;
}

.footer-column a:hover {
  color: var(--white);
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: var(--dark);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-light);
  transition: all 0.2s;
}

.footer-social a:hover {
  background: var(--primary);
  color: var(--white);
}

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

.footer-bottom p {
  color: var(--gray);
  font-size: 0.875rem;
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

.footer-legal a {
  color: var(--gray);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: span 2;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================================================
   CONTACT PAGE
   ============================================================================ */

.page-header {
  padding: 8rem 2rem 4rem;
  background: var(--darker);
  text-align: center;
}

.page-header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.25rem;
  color: var(--gray-light);
  max-width: 600px;
  margin: 0 auto;
}

.contact-section {
  padding: 4rem 2rem 6rem;
  background: var(--darkest);
}

.contact-container {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-item-icon {
  width: 48px;
  height: 48px;
  background: var(--dark);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.contact-item-content h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.contact-item-content p {
  color: var(--gray-light);
  font-size: 0.95rem;
}

.contact-form-card {
  background: var(--darker);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid var(--gray-dark);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-group label .required {
  color: var(--danger);
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--dark);
  border: 1px solid var(--gray-dark);
  border-radius: 8px;
  color: var(--white);
  font-size: 1rem;
  transition: all 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-control::placeholder {
  color: var(--gray);
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-submit {
  width: 100%;
}

.form-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  display: none;
}

.form-message.success {
  display: block;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--primary);
  color: var(--primary);
}

.form-message.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--danger);
  color: var(--danger);
}

@media (max-width: 768px) {
  .contact-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }
}

/* ============================================================================
   ABOUT PAGE
   ============================================================================ */

.about-section {
  padding: 4rem 2rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-content h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.about-content p {
  color: var(--gray-light);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.about-image {
  background: var(--darker);
  border-radius: 16px;
  padding: 3rem;
  text-align: center;
}

.services-list {
  list-style: none;
  margin-top: 2rem;
}

.services-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  color: var(--gray-light);
}

.services-list li svg {
  color: var(--primary);
  flex-shrink: 0;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.value-card {
  background: var(--darker);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--gray-dark);
}

.value-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.value-card p {
  color: var(--gray-light);
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   FEATURES PAGE
   ============================================================================ */

.features-hero {
  padding: 8rem 2rem 4rem;
  background: var(--darker);
  text-align: center;
}

.features-detail {
  padding: 4rem 2rem;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--gray-dark);
}

.feature-row:nth-child(even) .feature-row-content {
  order: 2;
}

.feature-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.feature-row-content h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.feature-row-content p {
  color: var(--gray-light);
  margin-bottom: 1.5rem;
}

.feature-row-content ul {
  list-style: none;
}

.feature-row-content li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  color: var(--gray-light);
}

.feature-row-content li svg {
  color: var(--primary);
  flex-shrink: 0;
}

.feature-row-image {
  background: var(--dark);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

@media (max-width: 768px) {
  .feature-row {
    grid-template-columns: 1fr;
  }

  .feature-row:nth-child(even) .feature-row-content {
    order: 0;
  }
}

/* ============================================================================
   SECURITY PAGE
   ============================================================================ */

.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.security-card {
  background: var(--darker);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid var(--gray-dark);
}

.security-card h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.security-card h3 svg {
  color: var(--primary);
}

.security-card p {
  color: var(--gray-light);
  font-size: 0.95rem;
}

.trust-badges {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 3rem;
}

.trust-badge {
  background: var(--darker);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  text-align: center;
  border: 1px solid var(--gray-dark);
}

.trust-badge svg {
  width: 48px;
  height: 48px;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.trust-badge span {
  display: block;
  font-weight: 600;
  color: var(--gray-light);
}

/* ============================================================================
   UTILITIES
   ============================================================================ */

.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary);
}

.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-4 { margin-top: 4rem; }
.mb-4 { margin-bottom: 4rem; }

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================================
   ADDITIONAL MOBILE STYLES
   ============================================================================ */

@media (max-width: 480px) {
  /* Navigation */
  .nav-container {
    padding: 0 1rem;
  }

  .nav-title {
    font-size: 1.25rem;
  }

  .nav-links {
    padding: 1.5rem 1rem;
  }

  .nav-cta {
    width: 100%;
    text-align: center;
    padding: 0.875rem 1.5rem;
  }

  /* Hero */
  .hero {
    padding: 5rem 1rem 3rem;
  }

  .hero-content h1 {
    font-size: 1.875rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .stat {
    text-align: center;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  /* Sections */
  .features,
  .integrations,
  .cta,
  .about-section,
  .features-detail,
  .contact-section {
    padding: 3rem 1rem;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .section-header p {
    font-size: 1rem;
  }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    padding: 1.5rem;
  }

  /* Integrations */
  .integrations-logos {
    gap: 1rem;
  }

  .integration-logo {
    padding: 1rem;
    flex: 1 1 45%;
  }

  /* CTA */
  .cta h2 {
    font-size: 1.75rem;
  }

  .cta p {
    font-size: 1rem;
  }

  /* Footer */
  .footer {
    padding: 2.5rem 1rem 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-legal {
    flex-direction: column;
    gap: 0.75rem;
  }

  /* Page header */
  .page-header {
    padding: 6rem 1rem 2.5rem;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }

  .page-header p {
    font-size: 1rem;
  }

  /* Contact */
  .contact-form-card {
    padding: 1.5rem;
  }

  /* Forms - prevent zoom on iOS */
  .form-control {
    font-size: 16px;
  }

  /* Buttons */
  .btn {
    padding: 0.875rem 1.25rem;
    width: 100%;
    justify-content: center;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .nav-link {
    padding: 0.5rem 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .nav-toggle {
    padding: 0.75rem;
    min-width: 44px;
    min-height: 44px;
  }

  .btn {
    min-height: 48px;
  }

  .footer-social a {
    width: 48px;
    height: 48px;
  }

  /* Remove hover effects */
  .feature-card:hover,
  .integration-logo:hover {
    transform: none;
  }

  .btn-primary:hover {
    transform: none;
  }
}

/* Safe area insets for notched phones */
@supports (padding: max(0px)) {
  .navbar {
    padding-left: max(0.5rem, env(safe-area-inset-left));
    padding-right: max(0.5rem, env(safe-area-inset-right));
  }

  .footer {
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }
}
