/* =========================================
   RAIMAK ENTERPRISE - MAIN STYLESHEET
   ========================================= */

/* --- Base Variables & Reset --- */
:root {
  @import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap");

  /* Raimak Brand Palette */
  --primary: #0a1a3f; /* Deep Raimak Navy */
  --accent: #00d2ff; /* Vibrant Fiber Cyan */
  --accent-light: rgba(0, 210, 255, 0.15); /* Soft cyan glow */

  /* Standard Colors */
  --dark: #333333;
  --white: #ffffff;
  --text-muted: rgba(
    255,
    255,
    255,
    0.7
  ); /* Silver off-white for taglines/footers */

  /* Dark Stained Glass Definitions */
  --glass-bg: rgba(10, 26, 63, 0.85); /* Rich translucent navy base */
  --glass-border: rgba(255, 255, 255, 0.12); /* Subtle rim lighting */
  --glass-blur: blur(15px); /* Premium frosted effect */

  /* Transition for fluid effect */
  --transition: all 0.4s ease-in-out;
}

/* Remove old h1 styling that conflicted with SVG logo */
header h1 {
  display: none;
}

/* --- Full-Height Layout (Fixes Floating Footers) --- */
body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  color: var(--white);
  background-color: #0a1a3f;
  position: relative;
  overflow-x: hidden;
  z-index: 0;

  /* NEW: Turns the body into a full-height column */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- Automatically absorbs empty space to push footer down --- */
main {
  flex: 1;
}

/* --- Dynamic Video Background & Overlays --- */
.dynamic-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background-color: #0a1a3f;
  overflow: hidden;
}

.bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 0;

  /* Crushes muddy MP4 shadow compression into pure black */
  filter: brightness(0.8) contrast(2);

  /* Crossfade Setup */
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.bg-video.active-video {
  opacity: 1;
}

/* Dot-Matrix overlay to mask compression banding */
.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(0, 0, 0, 0.35) 1px, transparent 1px);
  background-size: 3px 3px;
  z-index: 1;
  pointer-events: none;
}

/* --- Sticky Stained-Glass Header --- */
header {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 0 5% 0 0;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* --- The Dark Stained-Glass Plate Anchor --- */
.logo {
  display: flex;
  align-items: center;
  gap: 25px;
  text-decoration: none;
  padding: 5px 80px 5px 60px;
  background: rgba(5, 15, 40, 0.9);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: 0 2px 2px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 10px 0 25px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.logo:hover {
  background: rgba(8, 20, 50, 0.95);
  border-right-color: var(--accent);
  box-shadow:
    12px 0 30px rgba(0, 0, 0, 0.6),
    5px 0 20px rgba(0, 210, 255, 0.2);
}

/* --- Scaled & Glowing Logo Icon --- */
.logo-icon {
  width: 75px;
  height: 75px;
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(0, 210, 255, 0.45));
  flex-shrink: 0;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

.logo:hover .logo-icon {
  transform: scale(1.05);
  filter: drop-shadow(0 0 12px rgba(0, 210, 255, 0.8));
}

.logo-text-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
}

/* --- Crisp White Typography --- */
.logo-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 4px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.logo-tagline {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 4px;
}

/* --- Navigation Container & Links --- */
nav {
  display: flex;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  margin-left: 30px;
  font-weight: 600;
  font-size: 1.05rem;
  position: relative;
  padding-bottom: 6px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  transition:
    color 0.3s ease,
    text-shadow 0.3s ease;
}

nav a:hover {
  color: var(--white);
  text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

/* The Invisible Fiber-Cyan Underline */
nav a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--accent);
  box-shadow: 0 0 8px rgba(0, 210, 255, 0.8);
  transition:
    width 0.3s ease,
    left 0.3s ease;
  transform: translateX(-50%);
}

nav a:hover::after {
  width: 100%;
}

/* --- Hero Section (Transparent over Video) --- */
/* --- Hero Section (Smoked Glass Ribbon) --- */
.hero {
  /* Heavy, opaque navy tint that grounds the text while letting subtle light bleed through */
  background: rgba(10, 26, 63, 0.82);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);

  color: var(--white);
  padding: 6rem 5%;
  text-align: center;
  position: relative;

  /* Crisp glass edge-lighting along the top and bottom of the ribbon */
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);

  /* Casts a shadow onto the video below to separate the ribbon from the canvas */
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

/* Subtle ambient sheen across the ribbon */
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(0, 210, 255, 0.08) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero h2 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 15px;
  letter-spacing: -1px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.9);
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  margin: 0 auto 30px auto;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.hero h2 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 15px;
  letter-spacing: -1px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.9);
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  margin: 0 auto 30px auto;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  background: rgba(10, 26, 63, 0.85);
  backdrop-filter: blur(10px);
  color: var(--white);
  padding: 14px 32px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.btn.full-width {
  width: 100%;
  box-sizing: border-box;
}

.btn:hover {
  background: rgba(5, 15, 40, 0.95);
  border-color: var(--accent);
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 15px 30px rgba(0, 0, 0, 0.7),
    0 0 20px rgba(0, 210, 255, 0.2);
}

/* --- Layout Containers --- */
.container {
  padding: 4rem 5%;
  max-width: 1200px;
  margin: auto;
}

.container.narrow {
  max-width: 850px;
}

.container.form-container {
  max-width: 650px;
}

/* --- General Content Cards (Dark Stained Glass) --- */
.content-card {
  background: rgba(10, 26, 63, 0.65);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 40px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  margin-top: 5px;
  color: var(--white);
}

.content-card h2 {
  color: var(--white);
  margin-top: 0;
  font-weight: 800;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.9);
}

.content-card p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

/* --- Services Parent Container --- */
.services {
  display: flex;
  gap: 120px;
  flex-wrap: in-line;
  justify-content: center;
}

/* --- Interactive Service Cards (Dark Stained Glass) --- */
.service-card {
  background: rgba(10, 26, 63, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 30px;
  border-radius: 15px;
  flex: 1;
  min-width: 280px;
  max-width: 350px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);

  opacity: 0;
  transform-origin: center center;
  animation: springIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
  transition:
    transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Staggered Loading */
.service-card:nth-child(1) {
  animation-delay: 0.1s;
}
.service-card:nth-child(2) {
  animation-delay: 0.25s;
}
.service-card:nth-child(3) {
  animation-delay: 0.4s;
}

.service-card h3 {
  color: var(--white);
  margin-top: 0;
  font-weight: 700;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.9);
  text-align: center;
}

.service-card p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

.service-card:hover {
  background: rgba(5, 15, 40, 0.95);
  border-color: rgba(0, 210, 255, 0.4);
  border-top: 1px solid rgba(0, 210, 255, 0.6);
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.7),
    0 0 30px rgba(0, 210, 255, 0.15);
}

@keyframes springIn {
  0% {
    opacity: 0;
    transform: translateY(60px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- Dark Stained-Glass Forms & Inputs --- */
form {
  background: rgba(10, 26, 63, 0.75);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 40px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.telecom-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 15px;
}

.form-group-row {
  display: flex;
  gap: 20px;
}

.form-group-row .form-group {
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  margin-bottom: 5px;
}

.form-group label,
label {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Dark Glass Inputs & Dropdowns */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  background: rgba(5, 15, 40, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  box-sizing: border-box;
  transition: var(--transition);
  font-family: inherit;
  font-size: 1rem;
  color: var(--white);
}

/* High contrast option styling inside selects */
.form-group select option {
  background-color: var(--primary);
  color: var(--white);
}

/* Cyan Focus State */
input:focus,
textarea:focus,
.form-group input:focus,
.form-group select:focus {
  outline: none;
  background: rgba(5, 15, 40, 0.85);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.25);
}

/* A2P 10DLC Compliance Box (Dark Glass) */
.compliance-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(5, 15, 40, 0.5);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 5px;
}

.compliance-box input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.compliance-box label {
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
}

.compliance-box a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

/* Submit Button */
.submit-btn {
  background: var(--accent);
  color: var(--primary);
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  box-shadow: 0 10px 25px rgba(0, 210, 255, 0.25);
}

.submit-btn:hover {
  background: #33dfff;
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(0, 210, 255, 0.4);
}

@media (max-width: 768px) {
  .form-group-row {
    flex-direction: column;
    gap: 20px;
  }
}

/* --- Dark Stained-Glass Footer --- */
footer {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--text-muted);
  text-align: center;
  padding: 30px 5%;
  margin-top: 60px;
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

footer p {
  margin: 5px 0;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

footer a {
  color: var(--white);
  text-decoration: none;
  margin: 0 15px;
  font-weight: 600;
  position: relative;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--accent);
  text-shadow: 0 0 8px rgba(0, 210, 255, 0.5);
}

/* --- Swup Page Transition Animations --- */
.transition-fade {
  transition: 0.4s;
  opacity: 1;
  transform: translateY(0);
}

html.is-animating .transition-fade {
  opacity: 0;
  transform: translateY(10px);
}

/* --- Custom Cinema Dark Scrollbar --- */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #050e24; /* Deep Cinema Navy Track */
}

::-webkit-scrollbar-thumb {
  background: rgba(10, 26, 63, 0.9);
  border-radius: 10px;
  border: 2px solid #050e24;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
