/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Add scroll margin to account for fixed header */
* {
  scroll-margin-top: 88px;
}
body {
  font-family: 'Titillium Web', sans-serif;
  margin: 0;
  padding: 0;
  padding-top: 70px;
  /* Account for fixed header */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}

body.is-dark {
  background-color: #000;
}

main {
  flex: 1;
}

footer {
  min-height: 400px;
  margin-top: auto;
}

/* Header Styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  padding: 15px 0;
}

header.dark-mode {
  background-color: rgba(1, 1, 1, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header.dark-mode .menu li a {
  color: #fff !important;
}

header.dark-mode .menu li a:hover {
  color: #ff6900 !important;
}

/* Also make the logo visible in dark mode */
header.dark-mode img {
  filter: invert(1) brightness(0.9);
}

.page-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

@media (min-width: 2000px) {
  .page-container {
    max-width: 1400px;
  }
}

h1 {
  font-size: 5em;
  line-height: 1em;
  letter-spacing: 0.04em;
}

.menu {
  text-align: right;
}

.menu li {
  list-style-type: none;
  display: inline-block;
  /* margin: 2px 15px; */
}

.menu li + li {
  margin-left: 34px;
}

.menu li a {
  text-decoration: none;
  color: #000;
  letter-spacing: 0.04em;
  font-size: larger;
}

.menu li a:hover {
  color: #ff6900;
}

main section {
  padding: 80px 0;
}

section.grey {
  background-color: #f0f0f0;
  color: #444;
}

section.orange {
  background-color: #ff6900;
}

/* Footer Styles */
footer {
  /* background-color: #010101; */
  background-color: #141414;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 60px 0 30px;
  font-size: 16px;
}

footer .footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

footer .footer-section h3 {
  font-weight: normal;
  margin-bottom: 20px;
  color: white;
}

footer .footer-section h3 a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer .footer-section h3 a:hover {
  color: #ff6901;
}
footer .footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer .footer-section ul li {
  margin-bottom: 12px;
}

footer .footer-section ul li a {
  color: #b4b4b4;
  text-decoration: none;

  line-height: 1.6;
  transition: color 0.3s ease;
}

footer .footer-section ul li a:hover {
  color: #ff6901;
}

footer .footer-section .address {
  color: #b4b4b4;
  line-height: 1.2;
  padding-top: 12px;
}

footer .social-links {
  display: flex;
  gap: 24px;
}

footer .social-links a {
  color: white;
  transition: color 0.3s ease;
}

footer .social-links a:hover {
  color: #ff6901;
}

footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
}

footer .footer-description {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 30px;
}

footer .footer-description p {
  color: #b4b4b4;
  line-height: 1.6;
  max-width: 600px;
  margin: 0;
}

footer .footer-description .logo img {
  height: 110px !important;
  width: auto !important;
}

footer .footer-legal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

footer .copyright {
  color: white;
}

footer .legal-links {
  display: flex;
  gap: 32px;
}

footer .legal-links a {
  color: #b4b4b4;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer .legal-links a:hover {
  color: #ff6901;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  footer .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 30px 20px;
    grid-template-areas:
      'platform company'
      'contact follow';
    padding-left: 20px;
  }

  footer .footer-section:nth-child(1) {
    grid-area: platform;
  }

  footer .footer-section:nth-child(2) {
    grid-area: company;
  }

  footer .footer-section:nth-child(3) {
    grid-area: contact;
  }

  footer .footer-section:nth-child(4) {
    grid-area: follow;
  }

  footer .footer-description {
    display: block;
  }

  footer .footer-description .logo {
    float: right;
    margin-left: 20px;
    margin-bottom: 10px;
    margin-top: 20px;
  }

  footer .footer-description p {
    margin: 0;
    text-align: left;
  }
  footer .footer-legal {
    flex-direction: column;
    align-items: flex-start;
  }

  footer .legal-links {
    gap: 20px;
  }
}

/* Copyright styling for all screen sizes */
footer .copyright {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25em;
}

footer .copyright span {
  white-space: nowrap;
}

/* Small screens - stack social media icons in grid */
@media (max-width: 480px) {
  footer .social-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 120px;
  }
}

/* Small screens - reduce logo size to prevent overlap */
@media (max-width: 460px) {
  footer .footer-description .logo img {
    height: 80px !important;
    width: auto !important;
  }
}

.hero-app {
  background: url('/_static/images/section-bg-2.png') center/cover no-repeat,
    #444;
  color: white;
  padding: 100px 0;
  align-items: center;
}

.hero-app .hero-app-content h1 {
  font-size: 4rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  letter-spacing: -0.02em;
}

.hero-app .hero-app-content h2 {
  font-size: 2rem;
  font-weight: 400;
  margin: 0 0 1.5rem 0;
  opacity: 0.9;
}

.hero-app .hero-app-description {
  font-size: 1.25rem;
  line-height: 1.6;
  margin: 0 0 2.5rem 0;
  opacity: 0.9;
  max-width: 600px;
}

/* Shared hero/CTA buttons: index/index, platform/index, platform app pages (baseline: index/index) */
.hero-section .hero-buttons .btn,
.hero-app .hero-app-buttons .btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 400;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  text-align: center;
}

.hero-section .hero-buttons .btn-primary,
.hero-app .hero-app-buttons .btn-primary {
  background: #fff;
  color: #000;
}

.hero-section .hero-buttons .btn-primary:hover,
.hero-app .hero-app-buttons .btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: none;
}

.hero-section .hero-buttons .btn-secondary,
.hero-app .hero-app-buttons .btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-section .hero-buttons .btn-secondary:hover,
.hero-app .hero-app-buttons .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

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

.hero-app .hero-app-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.hero-app .hero-app-content {
  text-align: left;
}

.hero-app .hero-app-icon {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-left: auto;
}

.hero-app .app-icon {
  width: 320px;
  height: 440px;
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.25));
}

/* ===== Platform app pages (hero, features, feature-highlight) ===== */
body.platform-app .features-section {
  padding: 100px 0;
  background: #f8fafc;
}

body.platform-app .features-section .section-title {
  text-align: center;
  font-size: 4rem;
  font-weight: 800;
  margin: 0 0 4rem 0;
  color: #1f2937;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

body.platform-app .features-layout {
  display: grid;
  gap: 4rem;
  align-items: start;
}

body.platform-app .features-layout--list-left {
  grid-template-columns: 2fr 1fr;
}

body.platform-app .features-layout--showcase-left {
  grid-template-columns: 1fr 2fr;
}

body.platform-app .features-layout--showcase-left .feature-showcase {
  order: 1;
}

body.platform-app .features-layout--showcase-left .features-list {
  order: 2;
}

body.platform-app .features-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

body.platform-app .feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 2rem;
  background: white;
}

body.platform-app .feature-item .feature-icon {
  color: #444;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

body.platform-app .feature-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: #1f2937;
}

body.platform-app .feature-content p {
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
  font-size: 1rem;
}

body.platform-app .feature-showcase {
  text-align: center;
}

body.platform-app .feature-showcase img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  margin-bottom: 1.5rem;
}

body.platform-app .showcase-caption {
  font-size: 1.125rem;
  color: #6b7280;
  font-style: italic;
  margin: 0;
}

/* Feature highlight section (platform app pages) */
body.platform-app .feature-highlight-section {
  background-color: #e2e2e2;
  padding: 80px 0;
}

body.platform-app .feature-highlight-section .page-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

body.platform-app .feature-highlight-content {
  flex: 1;
  text-align: left;
}

body.platform-app .feature-highlight-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: #b0b3b8;
  margin-bottom: 1rem;
}

body.platform-app .feature-highlight-content h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1f2937;
}

body.platform-app .feature-highlight-content p {
  font-size: 1.15rem;
  color: #374151;
  margin-bottom: 0;
}

body.platform-app .feature-highlight-visual {
  flex: 1;
  text-align: right;
}

body.platform-app .feature-highlight-visual img {
  width: 100%;
  height: auto;
  min-width: 220px;
}

body.platform-app .feature-highlight-visual--row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 1rem;
  justify-content: flex-end;
  align-items: center;
}

body.platform-app .feature-highlight-visual--row img {
  width: auto;
  height: auto;
  min-width: 0;
  max-width: 180px;
  flex: 1 1 0;
  object-fit: contain;
}

@media (max-width: 768px) {
  body.platform-app .features-layout,
  body.platform-app .features-layout--list-left,
  body.platform-app .features-layout--showcase-left {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  body.platform-app .features-list {
    order: 2;
  }

  body.platform-app .feature-showcase {
    order: 1;
  }

  body.platform-app .features-section .section-title {
    font-size: 3rem;
  }

  body.platform-app .feature-highlight-section .page-container {
    flex-direction: column;
  }

  body.platform-app .feature-highlight-visual {
    text-align: center;
  }

  body.platform-app .feature-highlight-visual--row img {
    max-width: 33.333%;
  }
}

/* Explore Section */
.explore-section {
  padding: 3rem 0;
  background-color: #000000;
  color: #ffffff;
}

.explore-apps-grid {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 0;
  max-width: 100%;
  margin: 0;
  flex-wrap: nowrap;
}

.explore-app-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 0;
  text-decoration: none;
  color: #ffffff;
  transition: transform 0.2s, color 0.2s;
  border-radius: 8px;
  /* flex: 1; */
  min-width: 0;
}

.explore-app-card:hover {
  transform: translateY(-4px);
  color: #ff6901;
}

.explore-app-icon {
  width: 8rem;
  height: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #18181c;
  border-radius: 12px;
  transition: background-color 0.2s;
  position: relative;
}

.explore-app-card:hover .explore-app-icon {
  background-color: #ff6901;
}

.explore-app-icon img {
  width: 4rem;
  height: 4rem;
  filter: brightness(0) invert(1);
  transition: filter 0.2s;
}

.explore-app-card:hover .explore-app-icon img {
  filter: brightness(0) invert(1);
}

.explore-app-title {
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  margin: 0;
}

/* White line above current page icon */
.page-platform-work .explore-app-card.app-work .explore-app-icon::before,
.page-platform-forms .explore-app-card.app-forms .explore-app-icon::before,
.page-platform-knowledge
  .explore-app-card.app-knowledge
  .explore-app-icon::before,
.page-platform-comms .explore-app-card.app-comms .explore-app-icon::before,
.page-platform-journey .explore-app-card.app-journey .explore-app-icon::before,
.page-platform-iot .explore-app-card.app-iot .explore-app-icon::before,
.page-platform-mdm .explore-app-card.app-mdm .explore-app-icon::before,
.page-platform-accounting
  .explore-app-card.app-accounting
  .explore-app-icon::before {
  content: '';
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: #ffffff;
  border-radius: 2px;
}

/* Responsive Design for Explore Section */
@media (max-width: 768px) {
  .explore-apps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    justify-content: start;
  }

  .explore-app-card {
    padding: 1.5rem 0;
    min-width: 0;
  }

  .explore-app-icon {
    width: 6rem;
    height: 6rem;
  }

  .explore-app-icon img {
    width: 3rem;
    height: 3rem;
  }

  .explore-app-title {
    font-size: 1.125rem;
  }
}

/* ===== MOBILE RESPONSIVE DESIGN ===== */

/* Mobile Navigation Burger Menu */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: inherit;
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  margin-top: 14px;
  z-index: 1001;
}

.mobile-nav-toggle .hamburger {
  width: 24px;
  height: 2px;
  background: currentColor;
  display: block;
  position: relative;
  transition: all 0.3s ease;
}

.mobile-nav-toggle .hamburger::before,
.mobile-nav-toggle .hamburger::after {
  content: '';
  width: 24px;
  height: 2px;
  background: currentColor;
  display: block;
  position: absolute;
  transition: all 0.3s ease;
}

.mobile-nav-toggle .hamburger::before {
  top: -8px;
}

.mobile-nav-toggle .hamburger::after {
  bottom: -8px;
}

.mobile-nav-toggle.active .hamburger {
  background: transparent;
}

.mobile-nav-toggle.active .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}

.mobile-nav-toggle.active .hamburger::after {
  transform: rotate(-45deg);
  bottom: 0;
}

/* Responsive Page Container */
.page-container {
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .page-container {
    padding: 0 2rem;
  }
}

@media (min-width: 1240px) {
  .page-container {
    padding: 0;
  }
}

/* Mobile Typography */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5em;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2em;
  }
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: block;
  }

  .menu {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 999;
  }

  .menu.mobile-nav-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .menu li {
    display: block;
    margin: 0;
  }

  .menu li + li {
    margin-left: 0;
    margin-top: 1rem;
  }

  .menu li a {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    display: block;
  }

  /* Dark mode mobile menu */
  header.dark-mode .menu {
    background: rgba(1, 1, 1, 0.95);
  }

  header.dark-mode .mobile-nav-toggle {
    color: #fff;
  }

  /* Keep logo above mobile menu and add matching margin */
  header a[href='/'] {
    position: relative;
    z-index: 1002;
    margin-left: 7px;
  }

  /* Responsive sections */
  main section {
    padding: 40px 0;
  }

  /* Hero app responsive adjustments */
  .hero-app {
    padding: 50px 0;
  }

  .hero-app .hero-app-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-app .hero-app-content {
    text-align: center;
  }

  .hero-app .hero-app-icon {
    justify-content: center;
    margin-left: 0;
  }

  .hero-app .app-icon {
    width: 200px;
    height: 280px;
  }

  .hero-app .hero-app-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-app .btn {
    min-width: 200px;
  }
}
