/* ===== openXplane — landing page ===== */

/* --- Reset & base --- */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:#0a0f1a;color:#c8cdd8;line-height:1.6;
  -webkit-font-smoothing:antialiased;overflow-x:hidden;
}
img{display:block;max-width:100%;height:auto}
a{color:#60a5fa;text-decoration:none}
a:hover{color:#93c5fd}
::selection{background:#2563eb44;color:#fff}

/* --- Skip link --- */
.skip{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;z-index:100}
.skip:focus{position:fixed;top:8px;left:8px;width:auto;height:auto;padding:8px 16px;background:#1e293b;color:#fff;border-radius:6px;outline:2px solid #60a5fa}

/* --- Typography --- */
h1,h2,h3{color:#f1f5f9;font-weight:700;line-height:1.15}
h1{font-size:clamp(2.2rem,5vw,4rem);letter-spacing:-.03em}
h1 em{font-style:normal;color:#60a5fa}
h2{font-size:clamp(1.6rem,3.5vw,2.6rem);letter-spacing:-.02em}
h3{font-size:1.15rem}
.label{font-size:.75rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:#60a5fa;margin-bottom:.5rem}
.lead{font-size:1.15rem;color:#e2e8f0;line-height:1.5}
.subtitle{font-size:1.1rem;color:#94a3b8;max-width:36em;line-height:1.55}

/* --- Buttons --- */
.btn{
  display:inline-flex;align-items:center;gap:6px;
  padding:12px 28px;border-radius:8px;font-size:.9rem;font-weight:600;
  background:#2563eb;color:#fff;border:none;cursor:pointer;
  transition:background .15s,transform .1s;
}
.btn:hover{background:#3b82f6;color:#fff;transform:translateY(-1px)}
.btn-sm{padding:8px 18px;font-size:.82rem}
.btn-ghost{background:transparent;border:1px solid #334155;color:#e2e8f0}
.btn-ghost:hover{background:#1e293b;border-color:#475569;color:#fff}
.link-arrow{display:inline-flex;align-items:center;gap:4px;font-size:.9rem;font-weight:500;color:#60a5fa;margin-top:1rem}
.link-arrow::after{content:"\2192";transition:transform .15s}
.link-arrow:hover::after{transform:translateX(4px)}

/* --- Navigation --- */
.nav-bar{
  position:fixed;top:0;left:0;right:0;z-index:50;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 clamp(1rem,3vw,3rem);height:60px;
  background:rgba(10,15,26,.85);backdrop-filter:blur(12px);
  border-bottom:1px solid #1e293b;
}
.logo img{height:24px;width:auto}
.nav-bar nav{display:flex;align-items:center;gap:clamp(.8rem,2vw,2rem)}
.nav-bar nav a{font-size:.85rem;color:#94a3b8;font-weight:500;transition:color .15s}
.nav-bar nav a:hover{color:#f1f5f9}
.hamburger{display:none;background:none;border:none;cursor:pointer;padding:6px;flex-direction:column;gap:5px}
.hamburger span{display:block;width:22px;height:2px;background:#94a3b8;border-radius:2px;transition:transform .2s,opacity .2s}

/* --- Sections --- */
.section{padding:clamp(4rem,8vw,7rem) clamp(1.2rem,5vw,6rem);max-width:1200px;margin:0 auto}

/* --- Hero --- */
.hero{
  position:relative;min-height:100vh;display:flex;flex-direction:column;
  justify-content:center;padding:100px clamp(1.2rem,5vw,6rem) 0;
  max-width:1400px;margin:0 auto;overflow:hidden;
}
.hero-img{
  position:absolute;top:0;right:-5%;width:65%;max-width:800px;
  opacity:.35;object-fit:contain;pointer-events:none;
  mask-image:linear-gradient(to left,#000 40%,transparent);
  -webkit-mask-image:linear-gradient(to left,#000 40%,transparent);
}
.hero-fade{
  position:absolute;inset:0;
  background:radial-gradient(ellipse 80% 60% at 20% 50%,rgba(10,15,26,.1),rgba(10,15,26,.95) 70%);
  pointer-events:none;z-index:1;
}
.hero-content{position:relative;z-index:2;max-width:620px}
.hero-content h1{margin:.6rem 0 1.2rem}
.hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:2rem}
.hero-strip{
  position:relative;z-index:2;
  display:flex;flex-wrap:wrap;gap:clamp(1rem,3vw,2.5rem);
  margin-top:auto;padding:1.5rem 0;
  font-size:.8rem;color:#64748b;
}
.dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#22c55e;margin-right:6px;vertical-align:middle;animation:pulse 2s infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.4}}

/* --- About --- */
.about-grid{display:grid;grid-template-columns:1fr 1fr;gap:clamp(2rem,4vw,4rem);align-items:start}
.about p{margin-bottom:1rem}
.stat-row{
  display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;
  margin-top:3rem;padding-top:2rem;border-top:1px solid #1e293b;
}
.stat strong{display:block;font-size:1.8rem;color:#f1f5f9;font-variant-numeric:tabular-nums}
.stat span{font-size:.78rem;color:#64748b;text-transform:uppercase;letter-spacing:.05em}

/* --- Progress --- */
.progress-header{display:grid;grid-template-columns:1fr auto;gap:2rem;align-items:center;margin-bottom:2.5rem}
.ring-wrap{position:relative;width:120px;height:120px}
.ring{width:100%;height:100%}
.ring-fill{transition:stroke-dashoffset 1.2s ease}
.ring-text{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.ring-text strong{font-size:1.6rem;color:#f1f5f9;line-height:1.1;font-variant-numeric:tabular-nums}
.ring-text span{font-size:.65rem;color:#64748b;text-transform:uppercase;letter-spacing:.06em}
.subsystem-bars{display:grid;gap:.9rem}
.bar-row{display:grid;grid-template-columns:140px 1fr 60px;gap:1rem;align-items:center}
.bar-label{font-size:.82rem;color:#94a3b8;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bar-track{position:relative;height:20px;background:#111827;border:1px solid #1e293b;border-radius:6px;overflow:hidden}
.bar-impl{position:absolute;top:0;left:0;height:100%;background:linear-gradient(90deg,#1e40af,#2563eb);border-radius:5px;transition:width 1s ease}
.bar-veri{position:absolute;top:0;left:0;height:100%;background:linear-gradient(90deg,#059669,#10b981);border-radius:5px;transition:width 1s ease}
.bar-pct{font-size:.78rem;color:#64748b;text-align:right;font-variant-numeric:tabular-nums}
.progress-note{margin-top:1.5rem;font-size:.78rem;color:#475569;text-align:center}
.legend-impl{color:#60a5fa;font-weight:600}
.legend-veri{color:#34d399;font-weight:600}
@media(max-width:768px){
  .progress-header{grid-template-columns:1fr;justify-items:start}
  .ring-wrap{justify-self:center}
  .bar-row{grid-template-columns:100px 1fr 50px}
}

/* --- Aircraft --- */
.aircraft-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:1.5rem;margin-top:2rem}
.card{
  background:#111827;border:1px solid #1e293b;border-radius:12px;overflow:hidden;
  transition:transform .2s,border-color .2s;
}
.card:hover{transform:translateY(-4px);border-color:#334155}
.card img{width:100%;aspect-ratio:16/10;object-fit:cover}
.card-body{padding:1.2rem 1.5rem 1.5rem}
.card-body h3{margin:.4rem 0 .5rem}
.card-body p{font-size:.9rem;color:#94a3b8}

/* --- Gallery --- */
.gallery-header{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:1rem;margin-bottom:2rem}
.gallery-filters{display:flex;gap:8px}
.filter{
  padding:6px 16px;border-radius:20px;border:1px solid #1e293b;
  background:transparent;color:#94a3b8;font-size:.82rem;font-weight:500;cursor:pointer;
  transition:all .15s;
}
.filter:hover{border-color:#334155;color:#e2e8f0}
.filter.active{background:#1e293b;border-color:#334155;color:#f1f5f9}
.gallery-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1rem;
}
.gallery-item{
  background:#111827;border:1px solid #1e293b;border-radius:10px;overflow:hidden;
  cursor:pointer;transition:transform .2s,border-color .2s,opacity .3s;
}
.gallery-item:hover{transform:translateY(-3px);border-color:#334155}
.gallery-item.hidden{display:none}
.gallery-item img{width:100%;aspect-ratio:16/10;object-fit:cover;transition:transform .3s}
.gallery-item:hover img{transform:scale(1.03)}
.gallery-item figcaption{padding:.8rem 1rem 1rem;font-size:.82rem;color:#94a3b8;line-height:1.45}
.gallery-item figcaption strong{color:#cbd5e1;font-weight:600;margin-right:.3em}

/* lightbox */
.lightbox{
  position:fixed;inset:0;z-index:200;
  display:flex;align-items:center;justify-content:center;
  background:rgba(0,0,0,.88);backdrop-filter:blur(8px);
  opacity:0;pointer-events:none;transition:opacity .25s;
}
.lightbox.open{opacity:1;pointer-events:auto}
.lightbox img{max-width:92vw;max-height:88vh;border-radius:8px;box-shadow:0 8px 40px rgba(0,0,0,.5)}
.lightbox-close{
  position:absolute;top:1.2rem;right:1.5rem;
  background:none;border:none;color:#fff;font-size:2rem;cursor:pointer;opacity:.7;transition:opacity .15s;
}
.lightbox-close:hover{opacity:1}
.lightbox-caption{
  position:absolute;bottom:2rem;left:50%;transform:translateX(-50%);
  max-width:600px;text-align:center;
  font-size:.85rem;color:#cbd5e1;
  background:rgba(0,0,0,.6);padding:.6rem 1.2rem;border-radius:8px;
}

/* --- Engineering --- */
.eng-intro{max-width:48em;color:#94a3b8;margin-bottom:2.5rem}
.eng-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1.2rem}
.eng-card{
  background:#111827;border:1px solid #1e293b;border-radius:10px;padding:1.5rem;
  transition:border-color .2s;
}
.eng-card:hover{border-color:#334155}
.eng-icon{font-size:1.8rem;font-weight:800;color:#1e293b;margin-bottom:.8rem;font-variant-numeric:tabular-nums;line-height:1}
.eng-card h3{margin-bottom:.5rem}
.eng-card p{font-size:.88rem;color:#94a3b8;margin-bottom:.8rem}
.eng-status{
  display:inline-block;font-size:.72rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;
  padding:3px 10px;border-radius:12px;background:#1e293b;color:#64748b;
}
.eng-status.active{background:#172554;color:#60a5fa}

/* --- Download --- */
.download-sec{text-align:center}
.download-sec p{max-width:36em;margin:1rem auto 0}
.dl-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin-top:2rem}
.dl-note{font-size:.78rem;color:#475569;margin-top:1.5rem}

/* --- Footer --- */
footer{
  display:flex;flex-wrap:wrap;align-items:center;gap:1.5rem 3rem;
  padding:2rem clamp(1.2rem,5vw,6rem);
  border-top:1px solid #1e293b;
  font-size:.78rem;color:#475569;
  max-width:1400px;margin:0 auto;
}
footer nav{display:flex;gap:1.5rem}
footer nav a{color:#64748b}
footer nav a:hover{color:#94a3b8}
footer p{flex:1;text-align:right;min-width:200px}

/* --- Responsive --- */
@media(max-width:768px){
  .hamburger{display:flex}
  .nav-bar nav{
    position:fixed;top:60px;left:0;right:0;
    flex-direction:column;align-items:stretch;gap:0;
    background:rgba(10,15,26,.97);backdrop-filter:blur(12px);
    border-bottom:1px solid #1e293b;
    max-height:0;overflow:hidden;transition:max-height .3s;
  }
  .nav-bar nav.open{max-height:400px}
  .nav-bar nav a{padding:14px clamp(1.2rem,5vw,3rem);border-bottom:1px solid #111827}
  .hero-img{width:100%;right:0;top:auto;bottom:0;opacity:.2}
  .about-grid{grid-template-columns:1fr}
  .stat-row{grid-template-columns:repeat(2,1fr)}
  .gallery-grid{grid-template-columns:1fr 1fr}
  footer{flex-direction:column;text-align:center}
  footer p{text-align:center}
}
@media(max-width:480px){
  .gallery-grid{grid-template-columns:1fr}
  .hero-actions{flex-direction:column}
  .hero-actions .btn{width:100%;justify-content:center}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *{transition-duration:0s!important;animation-duration:0s!important}
}
