/* =========================================================
   EYJ Technologies — Homepage stylesheet
   Brand colors sampled directly from the logo (navy + cyan).
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --navy:           #0A1F4A;
  --cyan:           #06B3F0;
  --brand-gradient: linear-gradient(135deg, var(--navy) 0%, var(--cyan) 100%);

  --bg:             #FFFFFF;
  --bg-soft:        #F4F8FC;
  --bg-elevated:    #FFFFFF;
  --border:         #E1E8F2;
  --text:           #0A1F4A;
  --text-muted:     #5B6785;
  --primary:        #06B3F0;
  --primary-dark:   #0592C4;
  --primary-soft:   #E5F7FE;
  --accent:         #0A1F4A;
  --accent-soft:    #EAEEF7;
  --success:        #16A879;
  --radius:         12px;
  --container:      1180px;
  --shadow-sm: 0 1px 2px rgba(10,31,74,0.05), 0 1px 3px rgba(10,31,74,0.07);
  --shadow-md: 0 10px 30px -12px rgba(10,31,74,0.20);
  --shadow-lg: 0 24px 60px -20px rgba(10,31,74,0.28);
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Prevent horizontal scroll without breaking viewport coordinate calculations */
html {
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  width: 100%;
  padding-top: 78px; /* Offsets content behind the fixed header */
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

p { margin: 0 0 1em; color: var(--text-muted); max-width: 62ch; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 100px 0; }
@media (max-width: 720px) { section { padding: 64px 0; } }

.section-soft { background: var(--bg-soft); }

.eyebrow {
  color: var(--primary);
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--brand-gradient);
  z-index: 1002; transition: width 0.1s linear;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px -8px rgba(6,179,240,0.5); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 12px 26px -8px rgba(6,179,240,0.55); }
.btn-ghost { border-color: var(--border); color: var(--text); background: #fff; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 999;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  transition: height 0.25s ease;
}
.site-header.scrolled .inner { height: 62px; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  z-index: 1001;
}
.brand-logo { width: 34px; height: 34px; transition: transform 0.35s ease; }
.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.08); }
.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a { position: relative; color: var(--text-muted); font-size: 0.95rem; transition: color 0.15s ease; padding: 4px 0; }
.main-nav a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--primary); transition: width 0.2s ease;
}
.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after { width: 100%; }
.header-actions { display: flex; align-items: center; gap: 18px; z-index: 1001; }
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 38px; height: 38px; background: none; border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; flex-shrink: 0; padding: 0;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); margin: 0 auto; border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop {
  display: none; 
  position: fixed; 
  inset: 0; 
  background: rgba(10,31,74,0.45);
  z-index: 998; 
  opacity: 0; 
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.nav-backdrop.open { 
  display: block; 
  opacity: 1; 
  pointer-events: auto;
}

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    top: 78px; /* Starts directly beneath the default header height */
    right: 0;
    width: min(85vw, 320px);
    height: calc(100vh - 78px);
    height: calc(100dvh - 78px); /* Fills remainder of screen cleanly on mobile */
    box-sizing: border-box;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 24px; /* Removed the large 95px padding since it starts below the bar */
    gap: 12px;
    z-index: 998;
    box-shadow: -12px 10px 30px -12px rgba(10, 31, 74, 0.25);
    transform: translateX(100%);
    transition: transform 0.3s ease, top 0.25s ease, height 0.25s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Adjusts the menu position dynamically when the header shrinks on scroll */
  .site-header.scrolled .main-nav {
    top: 62px;
    height: calc(100vh - 62px);
    height: calc(100dvh - 62px);
  }

  .main-nav.open { 
    transform: translateX(0); 
  }

  .main-nav a {
    font-size: 1.05rem;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .main-nav a::after {
    display: none;
  }

  .header-cta { 
    display: none; 
  }

  .nav-toggle { 
    display: flex; 
  }

  /* Backdrop starts below the header bar as well */
  .nav-backdrop {
    top: 78px;
    height: calc(100vh - 78px);
    height: calc(100dvh - 78px);
    z-index: 997;
  }

  .site-header.scrolled ~ .nav-backdrop,
  .site-header.scrolled .nav-backdrop {
    top: 62px;
    height: calc(100vh - 62px);
    height: calc(100dvh - 62px);
  }
}

/* ---------- Social icons (header + footer) ---------- */
.social-icons { display: flex; align-items: center; gap: 10px; }
.social-icons a {
  width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--text-muted);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.social-icons a svg { width: 16px; height: 16px; }
.social-icons a:hover { background: var(--brand-gradient); color: #fff; border-color: transparent; transform: translateY(-3px) scale(1.06); }

/* ---------- Hero ---------- */
.hero { padding: 110px 0 90px; position: relative; overflow: hidden; }
.hero-watermark {
  position: absolute; top: 50%; right: -80px; width: 460px; height: 460px;
  transform: translateY(-50%);
  opacity: 0.06; pointer-events: none;
  animation: spin-slow 48s linear infinite;
}
@keyframes spin-slow {
  from { transform: translateY(-50%) rotate(0deg); }
  to   { transform: translateY(-50%) rotate(360deg); }
}
@media (max-width: 900px) { .hero-watermark { display: none; } }

.hero .orb {
  position: absolute; border-radius: 50%; pointer-events: none; filter: blur(2px);
  animation: float-orb 9s ease-in-out infinite;
}
.hero .orb-1 { width: 420px; height: 420px; top: -160px; right: -140px; background: radial-gradient(circle, rgba(6,179,240,0.18), transparent 70%); }
.hero .orb-2 { width: 260px; height: 260px; bottom: -80px; left: -80px; background: radial-gradient(circle, rgba(10,31,74,0.10), transparent 70%); animation-delay: -4s; }
@keyframes float-orb {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-18px, 22px); }
}

.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-intro { opacity: 0; transform: translateY(18px); animation: rise-in 0.7s ease forwards; }
.hero-intro.d1 { animation-delay: 0.05s; }
.hero-intro.d2 { animation-delay: 0.18s; }
.hero-intro.d3 { animation-delay: 0.3s; }
.hero-intro.d4 { animation-delay: 0.42s; }
@keyframes rise-in {
  to { opacity: 1; transform: translateY(0); }
}

.hero h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); max-width: 14ch; }
.hero p.lead { font-size: 1.1rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; margin: 32px 0 44px; flex-wrap: wrap; }

.stat-row { display: flex; gap: 40px; flex-wrap: wrap; }
.stat-row .stat b { display: block; font-family: var(--font-head); font-size: 1.7rem; color: var(--text); }
.stat-row .stat span { color: var(--text-muted); font-size: 0.88rem; }

.hero-visual {
  background: #10162A;
  border: 1px solid #232C48;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(18px) scale(0.98);
  animation: rise-in-scale 0.8s ease 0.25s forwards;
}
@keyframes rise-in-scale {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.hero-visual .bar { display: flex; gap: 7px; padding: 14px 18px; border-bottom: 1px solid #232C48; }
.hero-visual .bar span { width: 11px; height: 11px; border-radius: 50%; background: #37426A; }
.hero-visual .bar span:nth-child(1) { background: var(--cyan); }
.hero-visual pre {
  margin: 0; padding: 24px; font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.86rem; color: #B9C4E0; overflow-x: auto; white-space: pre;
}
.hero-visual .k { color: var(--cyan); }
.hero-visual .s { color: #4ADE80; }
.hero-visual .c { color: #5F6C89; }
.hero-visual .cursor { display: inline-block; width: 7px; height: 15px; background: #4ADE80; animation: blink 1s step-end infinite; vertical-align: text-bottom; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Section headings ---------- */
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Services ---------- */
.service-list { border-top: 1px solid var(--border); }
.service-row {
  position: relative;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  padding: 30px 24px;
  margin: 0 -24px;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
  transition: background 0.25s ease, padding-left 0.25s ease;
  overflow: hidden;
}
.service-row::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--brand-gradient);
  transform: scaleY(0); transform-origin: top; transition: transform 0.3s ease;
}
.service-row:hover { background: var(--bg-soft); padding-left: 32px; }
.service-row:hover::before { transform: scaleY(1); }
@media (max-width: 720px) { .service-row { grid-template-columns: 1fr; gap: 8px; } }
.service-row h3 { font-size: 1.15rem; color: var(--text); }
.service-row p { margin: 0; max-width: 60ch; }

/* ---------- Why choose us ---------- */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
@media (max-width: 860px) { .why-grid { grid-template-columns: 1fr; } }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
@media (max-width: 520px) { .pillars { grid-template-columns: 1fr; } }
.pillar { padding: 18px; border-radius: var(--radius); transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease; }
.pillar:hover { transform: translateY(-4px); background: #fff; box-shadow: var(--shadow-md); }
.pillar .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; margin-bottom: 10px;
  background: var(--primary-soft); color: var(--primary); font-family: var(--font-head); font-weight: 700; font-size: 0.95rem;
  transition: transform 0.25s ease;
}
.pillar:hover .num { transform: scale(1.12) rotate(-4deg); background: var(--brand-gradient); color: #fff; }
.pillar h4 { font-size: 1rem; color: var(--text); margin-bottom: 6px; }
.pillar p { font-size: 0.93rem; margin: 0; }

/* ---------- Success stories ---------- */
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 720px) { .story-grid { grid-template-columns: 1fr; } }
.story-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.story-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: #D7DEF3; }
.story-card .tag {
  display: inline-block; font-size: 0.78rem; font-weight: 600; color: var(--primary);
  background: var(--primary-soft); padding: 5px 12px; border-radius: 999px; margin-bottom: 16px;
}
.story-card h3 { color: var(--text); font-size: 1.2rem; }

/* ---------- Partners marquee ---------- */
.partners-section { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.partners-section .section-head { margin-bottom: 40px; }

.marquee { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 20px; width: max-content; align-items: center; }
.marquee-track a {
  display: flex; align-items: center; justify-content: center;
  height: 72px; padding: 0 26px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.marquee-track a:hover { transform: translateY(-4px) scale(1.03); box-shadow: var(--shadow-md); border-color: #D7DEF3; }
.marquee-track img, .marquee-track .logo-fallback {
  height: 34px; opacity: 0.7; filter: grayscale(1) contrast(0.85);
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.marquee-track a:hover img, .marquee-track a:hover .logo-fallback { opacity: 1; filter: none; }
.logo-fallback {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
  color: var(--text-muted); white-space: nowrap;
}

.marquee-row { padding: 10px 0; }
.marquee-row.left .marquee-track { animation: scroll-left var(--marquee-duration, 34s) linear infinite; }
.marquee-row.right .marquee-track { animation: scroll-right var(--marquee-duration, 34s) linear infinite; }
.marquee-row:hover .marquee-track { animation-play-state: paused; }

@keyframes scroll-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes scroll-right {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 14px; color: var(--text); font-family: var(--font-body); font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px var(--primary-soft); }
.field textarea { resize: vertical; min-height: 120px; }

.contact-info { display: flex; flex-direction: column; gap: 22px; }
.contact-info .item { display: flex; gap: 14px; align-items: flex-start; }
.contact-info .icon {
  width: 42px; height: 42px; border-radius: 10px; background: var(--primary-soft);
  color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: transform 0.25s ease;
}
.contact-info .item:hover .icon { transform: scale(1.1) rotate(-5deg); }
.contact-info h4 { color: var(--text); margin: 0 0 3px; font-size: 0.95rem; }
.contact-info p, .contact-info a { margin: 0; font-size: 0.92rem; }
.contact-info a:hover { color: var(--primary); }

.notice { padding: 14px 18px; border-radius: 8px; margin-bottom: 24px; font-size: 0.92rem; }
.notice.success { background: #E9FBF3; color: #0E8A5F; border: 1px solid #BDEFDA; }
.notice.error { background: #FDEEEE; color: #C23A3A; border: 1px solid #F6CFCF; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 32px; background: var(--bg-soft); }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .brand-logo { width: 26px; height: 26px; opacity: 0.85; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--primary); }
.copyright { color: var(--text-muted); font-size: 0.85rem; }

/* Skip link for accessibility */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff;
  padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }