/* home.css — Public landing page for api_ideas */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { width: 100%; height: 100%; overflow: hidden; background: #0a1428; }

#canvas-wrap {
  position: fixed; inset: 0; z-index: 0;
}
#canvas-wrap canvas { display: block; width: 100% !important; height: 100% !important; }

#home-ui {
  position: fixed; inset: 0; z-index: 10;
  display: flex; flex-direction: column; pointer-events: none;
}
#home-ui * { pointer-events: auto; }

/* ── Header ──────────────────────────────────────────────────────────────── */
.home-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 3px 28px;
  background: rgba(6,12,20,.55); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(79,195,247,.15);
  flex-shrink: 0;
}
.home-brand {
  display: flex; align-items: center; gap: 8px;
  color: #f0f4f8; text-decoration: none;
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: .88rem;
  line-height: 1;
}
.home-brand img { width: 22px; height: 22px; }
.home-header-actions {
  display: flex; align-items: center; gap: 6px;
}
.home-lang-selector {
  display: flex; gap: 2px;
}
.home-lang-btn {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.65); font-size: .62rem; font-weight: 700;
  padding: 1px 6px; border-radius: 3px; cursor: pointer; transition: all .2s;
  line-height: 1;
}
.home-lang-btn.active {
  background: rgba(125,211,252,.2); border-color: rgba(125,211,252,.45);
  color: #7dd3fc;
}
.home-cta-enter {
  padding: 3px 14px; border-radius: 5px; font-size: .75rem; font-weight: 700;
  background: #4fc3f7; color: #060c14; border: none; cursor: pointer;
  text-decoration: none; transition: background .2s; line-height: 1;
}
.home-cta-enter:hover { background: #81d4fa; }

/* ── Main scrollable ─────────────────────────────────────────────────────── */
.home-main {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column;
  align-items: center; padding: 0 6vw;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.home-hero {
  max-width: 860px; width: 100%; padding: 16px 0 10px; text-align: center;
}
.home-eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: #7dd3fc; margin-bottom: 5px; line-height: 1;
}
.home-title {
  font-family: 'Montserrat', sans-serif; font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700; line-height: 1.1; color: #fff;
  text-shadow: 0 0 40px rgba(125,211,252,.4); margin-bottom: 6px;
}
.home-subtitle {
  font-family: 'Montserrat', sans-serif; font-size: clamp(.92rem, 1.8vw, 1.15rem);
  font-weight: 600; color: #93e0fb; margin-bottom: 6px; line-height: 1.2;
}
.home-desc {
  font-size: clamp(.88rem, 1.5vw, 1rem); color: rgba(255,255,255,.82);
  line-height: 1.5; max-width: 680px; margin: 0 auto 10px;
}
.home-hero-cta {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}

/* ── Features grid ───────────────────────────────────────────────────────── */
.home-features {
  max-width: 860px; width: 100%; margin-bottom: 14px;
}
.home-features-title {
  font-family: 'Montserrat', sans-serif; font-size: .82rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: #7dd3fc;
  margin-bottom: 8px; text-align: center; line-height: 1;
}
.home-features-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.home-feature-card {
  background: rgba(255,255,255,.06); backdrop-filter: blur(8px);
  border: 1px solid rgba(79,195,247,.15); border-radius: 8px;
  padding: 12px 12px;
  transition: background .2s, border-color .2s;
}
.home-feature-card:hover {
  background: rgba(79,195,247,.08); border-color: rgba(79,195,247,.3);
}
.home-feature-icon {
  width: 28px; height: 28px; border-radius: 6px; margin-bottom: 6px;
  background: rgba(79,195,247,.15); display: flex; align-items: center; justify-content: center;
}
.home-feature-icon svg { color: #7dd3fc; width: 16px; height: 16px; }
.home-feature-name {
  font-size: .88rem; font-weight: 700; color: #f0f4f8; margin-bottom: 3px; line-height: 1.2;
}
.home-feature-desc {
  font-size: .8rem; color: rgba(255,255,255,.72); line-height: 1.4;
}

/* ── Active projects — warm amber accent to stand out ────────────────────── */
.home-projects {
  max-width: 860px; width: 100%; margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(251,191,36,.06) 0%, rgba(245,158,11,.03) 50%, rgba(13,27,42,.4) 100%);
  border: 1px solid rgba(251,191,36,.22);
  border-radius: 10px; padding: 10px 14px;
  box-shadow: 0 0 35px rgba(251,191,36,.07), inset 0 0 30px rgba(251,191,36,.03);
  position: relative;
}
.home-projects-title {
  font-family: 'Montserrat', sans-serif; font-size: .82rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: #fbbf24;
  margin-bottom: 6px; text-align: center; line-height: 1;
  text-shadow: 0 0 14px rgba(251,191,36,.35);
}
.home-projects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px;
}
.home-project-card {
  background: linear-gradient(135deg, rgba(251,191,36,.08) 0%, rgba(13,27,42,.8) 100%);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(251,191,36,.2); border-radius: 8px;
  padding: 8px 10px; text-decoration: none; display: block;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.home-project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(251,191,36,.45);
  box-shadow: 0 4px 20px rgba(251,191,36,.12), 0 0 10px rgba(251,191,36,.08);
}
.home-project-sector {
  font-size: .58rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #fbbf24; margin-bottom: 2px; line-height: 1;
}
.home-project-name {
  font-size: .92rem; font-weight: 700; color: #fff; margin-bottom: 2px;
  line-height: 1.2;
}
.home-project-desc {
  font-size: .78rem; color: rgba(255,255,255,.7); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.home-project-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 4px;
}
.home-project-meta {
  font-size: .58rem; color: #fcd34d; line-height: 1;
}
.home-project-arrow {
  display: flex; align-items: center; gap: 3px;
  font-size: .58rem; font-weight: 600; color: rgba(251,191,36,.55);
  transition: color .2s, transform .2s; line-height: 1;
}
.home-project-card:hover .home-project-arrow {
  color: #fbbf24; transform: translateX(3px);
}

/* ── Bottom CTA ──────────────────────────────────────────────────────────── */
.home-bottom-cta {
  max-width: 860px; width: 100%; text-align: center;
  padding: 10px 0 14px;
}
.home-bottom-question {
  font-family: 'Montserrat', sans-serif; font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 700; color: #fff; margin-bottom: 6px; line-height: 1.2;
}
.home-bottom-sub {
  font-size: .88rem; color: rgba(255,255,255,.75); margin-bottom: 10px; line-height: 1.3;
}

/* ── Shared CTA buttons ──────────────────────────────────────────────────── */
.cta-btn {
  padding: 10px 24px; border-radius: 8px; font-size: .95rem; font-weight: 700;
  text-decoration: none; transition: all .2s; display: inline-block; cursor: pointer;
  border: none; line-height: 1;
}
.cta-primary { background: #4fc3f7; color: #060c14; }
.cta-primary:hover { background: #81d4fa; transform: translateY(-1px); }
.cta-secondary {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); color: #fff;
}
.cta-secondary:hover { background: rgba(255,255,255,.2); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.home-footer {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 3px 28px; font-size: .65rem; flex-shrink: 0;
  background: rgba(6,12,20,.55); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(79,195,247,.15); color: rgba(255,255,255,.6);
  line-height: 1;
}
.footer-sep { opacity: .35; }

/* ── Help slide panel ────────────────────────────────────────────────────── */
.home-panel-backdrop {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(6,12,20,.65); backdrop-filter: blur(4px);
}
.home-panel-backdrop.open { display: block; }
.home-panel {
  position: fixed; top: 0; right: 0; height: 100%; width: min(480px, 100vw); z-index: 101;
  background: rgba(13,27,42,.96); backdrop-filter: blur(20px);
  border-left: 1px solid rgba(125,211,252,.2);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.home-panel.open { transform: translateX(0); }
.home-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid rgba(125,211,252,.15); flex-shrink: 0;
  font-weight: 700; font-size: .95rem; color: #e2e8f0;
}
.home-panel-close {
  background: none; border: none; cursor: pointer; color: rgba(255,255,255,.5);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 6px; transition: background .15s;
}
.home-panel-close:hover { background: rgba(255,255,255,.08); }
.home-panel-body {
  flex: 1; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
}
.help-step {
  display: flex; gap: 12px; align-items: flex-start;
}
.help-step-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: rgba(125,211,252,.15); border: 1px solid rgba(125,211,252,.35);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; color: #7dd3fc;
}
.help-step-title {
  font-size: .85rem; font-weight: 700; color: #f0f4f8; margin-bottom: 3px;
}
.help-step-desc {
  font-size: .78rem; color: rgba(255,255,255,.7); line-height: 1.4;
}

/* ── Contact form fields ─────────────────────────────────────────────────── */
.contact-field { margin-bottom: 12px; }
.contact-field label {
  display: block; font-size: .72rem; color: rgba(255,255,255,.6);
  margin-bottom: 4px;
}
.contact-input {
  width: 100%; background: rgba(255,255,255,.07);
  border: 1px solid rgba(125,211,252,.25); border-radius: 6px;
  padding: 8px 10px; color: #e2e8f0; font-size: .85rem;
  outline: none; font-family: inherit; transition: border-color .2s;
}
.contact-input:focus { border-color: rgba(125,211,252,.5); }
.contact-textarea { resize: vertical; }
select.contact-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237dd3fc' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 10px;
  padding-right: 28px; cursor: pointer;
}
select.contact-input option { background: #0d1b2a; color: #e2e8f0; }
.contact-submit {
  width: 100%; padding: 10px; background: #7dd3fc; color: #060c14;
  border: none; border-radius: 8px; font-weight: 700; font-size: .88rem;
  cursor: pointer; transition: background .2s; margin-top: 8px;
}
.contact-submit:hover { background: #a5e4fd; }
.contact-submit:disabled { opacity: .5; cursor: default; }
.contact-error {
  display: none; background: rgba(248,113,113,.12);
  border: 1px solid rgba(248,113,113,.3); color: #fca5a5;
  border-radius: 6px; padding: 8px 12px; font-size: .8rem; margin-bottom: 10px;
}

/* ── Large screens (>FHD) ───────────────────────────────────────────────── */
@media (min-width: 1440px) {
  .home-hero, .home-features, .home-bottom-cta { max-width: 1200px; }
  .home-desc { max-width: 900px; }
  .home-projects { max-width: 1400px; }
  .home-projects-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .home-features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .home-main { padding: 0 4vw; }
  .home-hero { padding: 12px 0 8px; }
  .home-features-grid { grid-template-columns: 1fr; }
  .home-projects-grid { grid-template-columns: 1fr; }
  .home-hero-cta { flex-direction: column; }
  .cta-btn { width: 100%; text-align: center; }
  html, body { overflow: auto; }
  .home-header { padding: 3px 16px; }
}
