/* Fonts */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Tajawal:wght@300;400;700;900&display=swap");

:root {
  /* Core Layout */
  --container-width: 1200px;
  --header-height: 70px;

  /* Theme: Default Light (High Contrast Industrial) */
  --bg-color: #f0f2f5;
  --text-color: #121212;
  --text-muted: #555;
  --card-bg: #ffffff;
  --border-color: #d1d5db;
  --accent: #2563eb; /* Strong Blue */
  --accent-glow: rgba(37, 99, 235, 0.15);

  /* Sharpness settings */
  --cut-size: 15px; /* Size of the cut corner */
}

[data-theme="dark"] {
  /* Theme: Cyber Dark */
  --bg-color: #050505;
  --text-color: #e0e0e0;
  --text-muted: #888;
  --card-bg: #111111;
  --border-color: #333;
  --accent: #00f3ff; /* Cyan */
  --accent-glow: rgba(0, 243, 255, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Outfit", "Tajawal", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  line-height: 1.5;
  font-size: 15px; /* Smaller base font */
  transition:
    background-color 0.3s,
    color 0.3s;
}

/* Background Grid Effect */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(var(--border-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center center;
  opacity: 0.05;
  z-index: -1;
  pointer-events: none;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(var(--bg-color), 0.9); /* Fallback */
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--text-color);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logo img {
  height: 32px;
  width: 32px;
  border-radius: 4px; /* Slight radius but mostly square */
}

nav {
  display: flex;
  gap: 20px;
}

nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: 0.2s;
  position: relative;
}

nav a:hover,
nav a.active {
  color: var(--accent);
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: 0.3s;
}

nav a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-cta {
  background: var(--accent);
  color: #000; /* Contrast text for accent */
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  clip-path: polygon(
    10px 0,
    100% 0,
    100% calc(100% - 10px),
    calc(100% - 10px) 100%,
    0 100%,
    0 10px
  );
  transition: 0.2s;
}

[data-theme="light"] .btn-cta {
  color: #fff;
} /* White text for blue accent in light mode */

.btn-cta:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* Hero Section */
.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: row; /* Changed from column to row */
  align-items: center; /* Center vertically */
  justify-content: space-between; /* Space out text and image */
  padding: 100px 5% 50px;
  max-width: var(--container-width);
  margin: 0 auto;
  position: relative;
  gap: 40px;
  overflow: hidden; /* Prevent spillover */
}

/* Constrain image on Desktop */
.hero-image img {
  max-height: 550px; /* Maximum reasonable height for desktop */
  width: auto;
  object-fit: contain;
  border-radius: 30px;
}

.hero-content {
  max-width: 600px;
  flex: 1; /* Take up available space */
}

.section-label {
  display: inline-block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 20px;
  font-weight: 900;
}

.hero h1 span {
  color: var(--accent); /* Solid Color */
  /* Removed outline effect based on user feedback */
}
[data-theme="dark"] .hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 30px;
  max-width: 450px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
}

.btn-store {
  border: 1px solid var(--text-color);
  color: var(--text-color);
  padding: 10px 24px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s;
  background: transparent;
}

.btn-store:hover {
  background: var(--text-color);
  color: var(--bg-color);
}

.btn-store.primary {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-store.primary:hover {
  background: var(--accent);
  color: #000;
}

/* Features Grid (Sharp Cards) */
.features {
  padding: 80px 5%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(240px, 1fr)
  ); /* Smaller min-width */
  gap: 20px;
}

.bento-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 25px; /* Smaller padding */
  position: relative;
  transition: 0.3s;
  /* Cut Corner Effect via Clip Path */
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - var(--cut-size)),
    calc(100% - var(--cut-size)) 100%,
    0 100%
  );
}

.bento-item:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
}

/* Corner decoration */
.bento-item::before {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: var(--cut-size);
  height: var(--cut-size);
  background: var(--accent);
  opacity: 0.2;
}

.bento-item i {
  font-size: 1.8rem; /* Smaller icon */
  color: var(--accent);
  margin-bottom: 15px;
  display: block;
}

.bento-item h3 {
  font-size: 1.1rem; /* Compact header */
  margin-bottom: 10px;
  font-weight: 700;
}

.bento-item p {
  font-size: 0.85rem; /* Smaller body text */
  color: var(--text-muted);
  line-height: 1.4;
}

/* Privacy Page Specifics */
.privacy-hub {
  padding: 100px 5%;
  max-width: 900px;
  margin: 0 auto;
}

.privacy-container {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 30px; /* Reduced padding */
}

.policy-content h3 {
  font-size: 1.1rem;
  color: var(--accent);
  margin-top: 25px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 5px;
  display: inline-block;
}

.policy-content ul li {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.lang-switch button {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 5px 15px;
  cursor: pointer;
  font-size: 0.8rem;
}
.lang-switch button.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 50px 5%;
  margin-top: 50px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  max-width: var(--container-width);
  margin: 0 auto;
}
footer h2,
footer h3 {
  font-size: 1rem;
  margin-bottom: 15px;
  color: var(--text-color);
}
footer p,
footer a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
}
footer a:hover {
  color: var(--accent);
}

/* Responsive Mobile */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  header {
    padding: 0 20px; /* Safe area padding */
  }

  /* Show Nav for now, or just critical links. 
     Better to keep it hidden if we don't have a burger menu, 
     but let's at least ensure the layout doesn't break. */
  nav {
    display: none; /* Keep hidden for simplicity as requested, but maybe add a mobile menu later */
  }

  .hero {
    flex-direction: column-reverse; /* Stack image ON TOP of text (or below? standard is image top, text bottom usually, or swap). Let's do column-reverse to put image up or text down? Actually, standard "Hero" on mobile: Image First, then Text. So column-reverse makes Image (2nd in DOM) appear Top. Wait, DOM is Content(1), Image(2). So column-reverse puts Image(2) first. */
    padding-top: 100px;
    padding-bottom: 40px;
    text-align: center;
    align-items: center;
    gap: 30px;
    min-height: auto; /* Remove 90vh constraint on mobile */
  }

  .hero-content {
    width: 100%;
  }

  .hero-image {
    width: 100%;
    justify-content: center;
    margin-bottom: 20px;
  }

  .hero-image img {
    max-height: 400px; /* Limit height so it doesn't take full screen */
    width: auto;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    margin: 0 auto 30px; /* Center align paragraph */
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    align-items: center;
  }

  .btn-store {
    justify-content: center;
    width: 100%;
    max-width: 300px; /* Don't stretch too wide */
  }

  /* Ensure cards take full width but keep small padding */
  .bento-grid {
    grid-template-columns: 1fr;
  }

  /* Center footer on mobile */
  footer {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .logo span {
    display: block; /* If logo text gets too long */
  }
}
