/* =========================
   SwiftGraphix — Dark SaaS (Automotive)
   ========================= */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* ---- Design Tokens ---- */
:root{
  /* Palette */
  --bg: #0B0F14;             /* deep slate page bg */
  --bg-elev: #10161D;        /* elevated panels */
  --surface: #0F1621;        /* cards/nav */
  --line: #18212B;           /* subtle borders */

  --text: #E7EDF6;           /* primary text */
  --muted: #A6B3C2;          /* secondary text */

  --brand: #0CA8FF;          /* cyan accent */
  --brand-600:#0895E0;
  --brand-700:#067AB8;
  --brand-soft: rgba(12,168,255,.12);

  /* Radii / Shadows / Space */
  --radius: 14px;
  --shadow-sm: 0 6px 16px rgba(0,0,0,.45);
  --shadow-md: 0 16px 32px rgba(0,0,0,.55);

  /* Type scale */
  --h1: clamp(2.2rem, 2vw + 1.7rem, 3.2rem);
  --h2: clamp(1.6rem, 1.2vw + 1.2rem, 2.2rem);
  --h3: clamp(1.2rem, .6vw + 1rem, 1.5rem);
  --p:  clamp(1rem, .2vw + .95rem, 1.125rem);
}

/* ---- Base ---- */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a{color: var(--brand); text-decoration:none}
a:hover{color: var(--brand-600)}

/* =========================
   Header / Navigation
   ========================= */
.header{
  position: sticky; top: 0; z-index: 1000;
  backdrop-filter: saturate(140%) blur(8px);
  background: rgba(15,22,33,.9);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}
.header.is-scrolled{ box-shadow: var(--shadow-sm) }
.header-inner{
  display:flex; align-items:center; justify-content:space-between;
  max-width:1200px; margin:0 auto; width:100%;
  padding: .7rem 1rem;
}
.logo img{height: 44px}

/* Nav */
.nav{display:flex; align-items:center}
.nav ul{list-style:none; display:flex; gap:28px; margin:0; padding:0}
.nav ul li a{
  color: var(--muted); font-weight:600; font-size: 15.5px; padding:.35rem 0; position:relative;
}
.nav ul li a:hover{color: var(--text)}
.nav ul li a[aria-current="page"]{ color: var(--text) }
/* underline animation */
.nav ul li a::after{
  content:""; position:absolute; left:0; right:100%; bottom:-6px; height:2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-600));
  transition: right .35s var(--e-out);
  border-radius: 2px;
}
.nav ul li a:hover::after,
.nav ul li a[aria-current="page"]::after{ right:0 }

/* Mobile burger */
.menu-toggle{
  display:none; flex-direction:column; justify-content:center; align-items:center;
  cursor:pointer; padding:8px; width:40px; height:40px; border-radius:10px;
  border:1px solid var(--line); background: var(--surface);
  position:absolute; top:12px; right:20px;
}
.menu-toggle span{
  height:3px; width:22px; background: var(--text);
  margin:3px 0; border-radius:2px; transition: transform .25s ease, opacity .25s ease;
}
.menu-toggle.open span:nth-child(1){ transform: rotate(45deg) translate(4px,4px) }
.menu-toggle.open span:nth-child(2){ opacity:0 }
.menu-toggle.open span:nth-child(3){ transform: rotate(-45deg) translate(4px,-4px) }

/* Mobile nav */
@media (max-width:880px){
  .menu-toggle{display:flex}
  .nav{
    position:absolute; top:100%; left:0; width:100%;
    display:none; flex-direction:column;
    background: var(--surface); border-bottom:1px solid var(--line);
    box-shadow: var(--shadow-sm);
    animation: fadeInNav .25s ease;
  }
  .nav.active{display:flex}
  .nav ul{flex-direction:column; width:100%}
  .nav ul li a{display:block; padding:1rem; border-top:1px solid var(--line)}
}
@keyframes fadeInNav{
  from{opacity:0; transform:translateY(-4px)}
  to{opacity:1; transform:translateY(0)}
}

/* =========================
   Flash Messages
   ========================= */
.flash-messages {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: 80%;
  max-width: 600px;
}
.flash-message {
  padding: 12px 20px;
  margin: 10px 0;
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
  opacity: 1;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  animation: fadeOut 5s forwards;
}
.flash-message.success { border-left:4px solid #28a745 }
.flash-message.warning { border-left:4px solid #ffc107 }
.flash-message.danger { border-left:4px solid #dc3545 }
@keyframes fadeOut { from {opacity:1} to{opacity:0} }

/* =========================
   Contact Section + Modal
   ========================= */
.contact-section {
  text-align:center;
  padding: 100px 20px;
  background: var(--bg-elev);
  color: var(--text);
}
.contact-section h1 {
  font-size: var(--h1);
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 10px;
}
.contact-section p {
  font-size: var(--p);
  color: var(--muted);
  margin-bottom: 20px;
}
.contact-button {
  background: linear-gradient(180deg,var(--brand),var(--brand-600));
  color: #fff; font-size: 18px; font-weight:600;
  padding: 12px 25px; border-radius: 10px; border:none; cursor:pointer;
  transition: .3s;
}
.contact-button:hover { filter:saturate(110%); transform: translateY(-2px) }

/* Modal Overlay */
.contact-overlay {
  display:none; position:fixed; inset:0;
  background: rgba(0,0,0,.5); z-index: 999;
}

/* Modal */
.contact-modal {
  display:none; position:fixed; top:50%; left:50%;
  transform:translate(-50%,-50%);
  width: 45%; max-width: 550px;
  background: var(--surface);
  padding:30px; border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index:1000; color: var(--text);
  max-height:90vh; overflow-y:auto;
}
.contact-modal h2 {
  margin-bottom:20px; font-size:var(--h2); font-weight:700;
  color: var(--brand); text-align:center;
}
.contact-modal label{font-weight:600; color: var(--muted); margin-bottom:4px; display:block}
.contact-modal input,
.contact-modal select,
.contact-modal textarea {
  width:100%; padding:12px; border:1px solid var(--line);
  border-radius:10px; font-size:15px;
  background: var(--bg-elev); color: var(--text);
}
.contact-modal input:focus,
.contact-modal select:focus,
.contact-modal textarea:focus {
  outline:none; border-color: var(--brand);
  background: var(--surface);
}
.contact-modal .modal-buttons {
  display:flex; justify-content:flex-end; gap:10px; margin-top:10px;
}
.contact-modal button {
  padding: 12px 18px; border:none; border-radius:8px;
  font-weight:600; font-size:15px; cursor:pointer;
}
.contact-modal .submit-btn { background: var(--brand); color:#fff }
.contact-modal .submit-btn:hover { background: var(--brand-600) }
.contact-modal .close-btn { background: var(--line); color: var(--text) }
.close { position:absolute; top:15px; right:20px; font-size:24px; cursor:pointer; color: var(--muted) }
.close:hover{color: var(--text)}

@media (max-width:768px){
  .contact-modal{ width:90%; padding:16px }
  .contact-modal h2{ font-size:18px }
}

/* =========================
   Footer
   ========================= */
.footer-section{
  background: var(--bg-elev); color: var(--text);
  padding: 60px 20px; font-size:14px; border-top:1px solid var(--line);
}
.footer-container{
  display:flex; justify-content:space-between; flex-wrap:wrap;
  max-width:1200px; margin:0 auto; gap:20px;
}
.footer-column{flex:1; min-width:250px; text-align:left}
.footer-column h3{color:var(--brand); font-size:18px; margin-bottom:15px}
.footer-column p, .footer-column a{color: var(--muted); line-height:1.8}
.footer-column ul{list-style:none; padding:0; margin:0}
.footer-column ul li{margin-bottom:10px}
.footer-column ul li a{color: var(--brand); font-size:16px}
.footer-column ul li a:hover{color: var(--brand-600); text-decoration:underline}
.footer-bottom{text-align:center; margin-top:28px; padding-top:18px; border-top:1px solid var(--line); color:#8FA0AF}
.social-icons a{display:inline-block; margin:0 10px; font-size:18px; color: var(--brand)}
.social-icons a:hover{color: var(--brand-600)}

/* =========================
   Contact Section (Professional)
   ========================= */
.contact-section{
  padding: 96px 20px;
  background: var(--bg-elev);
}

.contact-shell{
  max-width: 1100px;
  margin: 0 auto;
}

.contact-hero{
  text-align: center;
  padding: 36px 20px;
}

.contact-hero h1{
  font-size: var(--h1);
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 10px;
}

.contact-hero p{
  font-size: var(--p);
  color: var(--muted);
  max-width: 760px;
  margin: 0 auto 22px;
  line-height: 1.7;
}

.contact-actions{
  display:flex;
  justify-content:center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.contact-button{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  background: linear-gradient(180deg,var(--brand),var(--brand-600));
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.06);
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease;
}
.contact-button:hover{ filter:saturate(110%); transform: translateY(-2px) }

.contact-button.secondary{
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.contact-button.secondary:hover{
  background: rgba(255,255,255,.04);
  transform: translateY(-2px);
}

.contact-note{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(12,168,255,.08);
  border: 1px solid rgba(12,168,255,.18);
  color: var(--muted);
  font-size: 13.5px;
}

/* =========================
   Contact Drawer (no modal)
   ========================= */
.contact-drawer{
  margin: 26px auto 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;

  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height .35s ease, opacity .25s ease, transform .25s ease;
}

.contact-drawer.open{
  max-height: 1000px; /* large enough to reveal content */
  opacity: 1;
  transform: translateY(0);
}

.drawer-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.02);
}

.drawer-header h2{
  margin: 0;
  color: var(--text);
  font-size: 18px;
}
.drawer-header p{
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.drawer-close{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor:pointer;
}
.drawer-close:hover{
  color: var(--text);
  background: rgba(255,255,255,.04);
}

.contact-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 18px 18px;
}

.contact-card{
  display:flex;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
}

.contact-card-icon{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(12,168,255,.10);
  border: 1px solid rgba(12,168,255,.18);
  color: var(--brand);
  flex: 0 0 auto;
}

.contact-card-body h3{
  margin: 0;
  font-size: 15.5px;
  color: var(--text);
}
.contact-card-body p{
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}
.contact-link{
  display:inline-flex;
  gap: 8px;
  align-items:center;
  font-weight: 600;
  color: var(--brand);
}
.contact-link:hover{ color: var(--brand-600) }

.drawer-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  color: var(--muted);
  font-size: 13.5px;
}

.drawer-footer-btn{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg,var(--brand),var(--brand-600));
  color: #fff;
  font-weight: 700;
}
.drawer-footer-btn:hover{ filter:saturate(110%) }

@media (max-width: 860px){
  .contact-grid{ grid-template-columns: 1fr; }
  .drawer-footer{ flex-direction: column; align-items: flex-start; }
}