/* ELITE CINEMATIC VARIABLES */
:root { 
  --CD-black: #000000; 
  --CD-off-white: #fbfbfd; 
  --EIV-accent: #ff7a00; 
  --CD-border: rgba(0,0,0,0.1);
  --CD-text-gray: #6e6e73;
  --CD-error: #ff3b30; 
}

body { 
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  background-color: #ffffff; color: var(--CD-black); -webkit-font-smoothing: antialiased;
  letter-spacing: -0.015em; margin: 0; padding: 0; scroll-behavior: smooth; overflow-x: hidden;
}

h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.05em; margin-top: 0; }
p { line-height: 1.5; color: var(--CD-text-gray); margin-top: 0; }

.reveal { opacity: 0; transform: translateY(30px); transition: all 1s cubic-bezier(0.23, 1, 0.32, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* HEADER & SVG LOGO ALIGNMENT */
.brand-header { 
  padding: 15px 5%; position: fixed; top: 0; width: 100%; z-index: 1000; 
  background: rgba(255,255,255,0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--CD-border); display: flex; justify-content: space-between; align-items: center; box-sizing: border-box;
}

.brand-logo { display: flex; align-items: center; font-size: 1.5rem; font-weight: 800; letter-spacing: 0.05em; }
.eivira-text { background: linear-gradient(90deg, #f7941d, #ff7a00); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--CD-black); text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--CD-text-gray); }

.system-status { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; font-weight: 700; color: var(--CD-text-gray); letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid var(--CD-border); padding: 6px 12px; border-radius: 20px; }
.status-dot { width: 8px; height: 8px; background-color: var(--EIV-accent); border-radius: 50%; box-shadow: 0 0 10px rgba(255, 122, 0, 0.5); }

/* BUTTONS */
.btn-primary-elite { 
  background: var(--CD-black); color: #fff !important; padding: 18px 40px; border-radius: 100px; 
  font-size: 1.1rem; font-weight: 700; text-decoration: none; display: inline-block; 
  transition: transform 0.3s, box-shadow 0.3s; border: none; cursor: pointer; box-sizing: border-box; text-align: center;
}
.btn-primary-elite:hover { transform: scale(1.02); box-shadow: 0 10px 20px rgba(0,0,0,0.15); }

.btn-white { 
  background: #fff; color: var(--CD-black); padding: 18px 40px; border-radius: 100px; 
  font-weight: 700; text-decoration: none; display: inline-block; transition: transform 0.3s; border: 1px solid var(--CD-border); cursor: pointer; box-sizing: border-box; text-align: center;
}
.btn-white:hover { transform: scale(1.02); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

.button-group { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

/* HERO */
.hero-authority { padding: 180px 20px 100px; text-align: center; }

/* SCROLLING MARQUEE */
.trust-badges-section { background: #fff; padding: 30px 0; border-top: 1px solid var(--CD-border); border-bottom: 1px solid var(--CD-border); overflow: hidden; width: 100%; }
.marquee-container { display: flex; width: fit-content; animation: scrollBadges 30s linear infinite; }
.marquee-container:hover { animation-play-state: paused; }
.marquee-track { display: flex; align-items: center; flex-shrink: 0; white-space: nowrap; }
.marquee-track span { font-family: monospace; font-size: 1rem; font-weight: 700; color: #a1a1a6; margin: 0; transition: color 0.3s ease; cursor: default; }
.marquee-track span:hover { color: var(--CD-black); }
.dot-separator { margin: 0 40px !important; color: #e5e5ea !important; }
@keyframes scrollBadges { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* GENERIC SECTIONS */
.cinematic-section { padding: 120px 5%; }
.cinematic-section.light { background: #fff; }
.cinematic-section.gray { background: var(--CD-off-white); }
.cinematic-section.dark { padding-top: 120px; padding-bottom: 120px; }
.section-header { text-align: center; margin-bottom: 60px; max-width: 800px; margin-left: auto; margin-right: auto; }
.section-header h2 { font-size: clamp(2.5rem, 5vw, 4rem); color: var(--CD-black); }
.section-header p { font-size: 1.2rem; color: var(--CD-text-gray); }

/* SPLIT LAYOUTS */
.split-layout { display: flex; align-items: center; justify-content: space-between; gap: 60px; max-width: 1200px; margin: 0 auto; }
.split-text { flex: 1; }
.split-text h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
.split-visual { flex: 1; display: flex; justify-content: center; width: 100%; }

/* ROTATING QUOTE BOX */
.rotating-text-box { 
  background: var(--CD-off-white); 
  padding: 30px; 
  border: 1px solid var(--CD-border); 
  border-radius: 16px; 
  border-left: 4px solid var(--CD-black); 
  min-height: 145px; 
  box-sizing: border-box; 
}

/* CSS TELEMETRY WINDOW */
.telemetry-window { background: #111; border-radius: 12px; width: 100%; border: 1px solid #333; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.1); font-family: monospace; text-align: left; }
.tw-header { background: #222; padding: 12px 16px; display: flex; align-items: center; border-bottom: 1px solid #333; }
.tw-dots { display: flex; gap: 8px; margin-right: 16px; }
.tw-dots span { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.tw-title { color: #888; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; }
.tw-body { padding: 24px; color: #fff; font-size: 0.9rem; line-height: 1.8; }
.log-line { margin-bottom: 8px; opacity: 0; animation: logFadeIn 0.1s forwards; word-break: break-word; }
.log-line:nth-child(1) { animation-delay: 0.5s; }
.log-line:nth-child(2) { animation-delay: 1.2s; }
.log-line:nth-child(3) { animation-delay: 1.8s; }
.log-line:nth-child(4) { animation-delay: 2.8s; }
.log-line:nth-child(5) { animation-delay: 4.0s; }
.cursor { display: inline-block; width: 8px; height: 15px; background: #fff; margin-left: 4px; vertical-align: text-bottom; animation: blink 1s step-end infinite; }
@keyframes logFadeIn { to { opacity: 1; } }
@keyframes blink { 50% { opacity: 0; } }

/* GRID CARDS */
.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; max-width: 1200px; margin: 0 auto; }
.cinematic-card { background: #fff; padding: 40px; border-radius: 24px; border: 1px solid var(--CD-border); transition: transform 0.3s, box-shadow 0.3s; text-align: left; box-sizing: border-box; }
.cinematic-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.05); }
.cinematic-card i { font-size: 2rem; color: var(--CD-black); margin-bottom: 20px; }
.cinematic-card h3 { font-size: 1.3rem; margin-bottom: 15px; color: var(--CD-black); }

/* DARK GRID CARDS */
.cinematic-card-dark { background: #111; padding: 40px; border-radius: 24px; border: 1px solid rgba(255,255,255,0.1); text-align: left; box-sizing: border-box; }
.icon-dark { font-size: 2rem; color: #fff; margin-bottom: 20px; }
.cinematic-card-dark h4 { color: #fff; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 15px; }
.cinematic-card-dark p { color: #86868b; font-size: 0.95rem; margin: 0; }

/* FOOTER */
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; border-bottom: 1px solid #222; padding-bottom: 40px; margin-bottom: 30px; text-align: left; }
.footer-grid a:hover { color: #fff !important; }

/* INPUT STYLES & FORM VALIDATION */
input, textarea { outline: none; transition: border 0.3s; font-family: inherit; position: relative; }
input:focus, textarea:focus { border-color: var(--CD-black) !important; background: #fff !important; }
.input-error { border-color: var(--CD-error) !important; animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both; }
.error-message { color: var(--CD-error); font-size: 0.75rem; font-weight: 700; margin-top: 6px; text-transform: uppercase; letter-spacing: 0.05em; display: block; }
@keyframes shake { 
  10%, 90% { transform: translate3d(-1px, 0, 0); } 
  20%, 80% { transform: translate3d(2px, 0, 0); } 
  30%, 50%, 70% { transform: translate3d(-3px, 0, 0); } 
  40%, 60% { transform: translate3d(3px, 0, 0); } 
}

/* MODAL STYLES */
body.modal-open { overflow: hidden; }
.modal-overlay { 
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
  background: rgba(0,0,0,0.6); z-index: 10000; align-items: center; justify-content: center; 
  backdrop-filter: blur(8px); animation: fadeIn 0.3s ease; 
}
.modal-box { 
  background: #fff; padding: 48px; border-radius: 24px; max-width: 500px; width: 95%; 
  max-height: 90vh; overflow-y: auto; position: relative; box-shadow: 0 25px 50px rgba(0,0,0,0.15); 
  text-align: left; animation: modalFadeIn 0.3s ease-out; box-sizing: border-box;
}
.modal-box-large { max-width: 700px; padding: 40px; }
.modal-close { 
  position: absolute; top: 20px; right: 20px; background: transparent; border: none; 
  font-size: 1.5rem; cursor: pointer; color: #9ca3af; width: 36px; height: 36px; 
  display: flex; align-items: center; justify-content: center; transition: all 0.2s; 
}
.modal-close:hover { color: #111; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalFadeIn { 
  from { opacity: 0; transform: translateY(20px) scale(0.95); } 
  to { opacity: 1; transform: translateY(0) scale(1); } 
}

/* =========================================================
   MOBILE OPTIMIZATIONS
   ========================================================= */

@media (max-width: 992px) { 
  .split-layout { flex-direction: column; text-align: center; gap: 40px; } 
  .split-text { padding-left: 0 !important; } 
  .telemetry-window { margin: 0 auto; }
  .cinematic-section { padding: 100px 5%; }
}

@media (max-width: 768px) { 
  .nav-links a:not(.btn-primary-elite) { display: none; } 
  .nav-links .btn-primary-elite { padding: 10px 20px; font-size: 0.85rem; }
  .nav-links .system-status { display: none; }
  
  .hero-authority { padding-top: 130px; padding-bottom: 60px; }
  .button-group { flex-direction: column; width: 100%; }
  .button-group a { width: 100%; margin: 0; }
  
  /* Prevent terminal text from blowing out the container on small phones */
  .tw-body { font-size: 0.75rem; padding: 16px; line-height: 1.6; }
  
  /* Give the rotating box more height because text will wrap to 3 or 4 lines */
  .rotating-text-box { min-height: 180px; padding: 20px; }
  
  .grid-container { grid-template-columns: 1fr; gap: 20px; }
  .cinematic-card, .cinematic-card-dark { padding: 30px; }
  
  .modal-box { padding: 32px 24px; }
}