/* NVP R&D Lab — shared styles. Light, airy, graphite. */
:root {
  --graphite: #373737;
  --graphite-soft: #5c5c5c;
  --muted: #8a8a8a;
  --line: #ececec;
  --bg: #ffffff;
  --bg-alt: #fafafa;
  --accent: #373737;
  --radius: 16px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--graphite);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

/* Wordmark logo */
.wordmark {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--graphite);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wordmark .rd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 8px;
  border: 1.5px solid var(--graphite);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1;
}

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--graphite-soft); font-size: 15px; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--graphite); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform .12s ease, box-shadow .15s ease, background .15s;
}
.btn-primary { background: var(--graphite); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(55,55,55,0.18); }
.btn-ghost { border: 1.5px solid var(--line); color: var(--graphite); }
.btn-ghost:hover { border-color: var(--graphite); }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 14px;
}
h1, h2, h3 { color: var(--graphite); letter-spacing: -0.02em; }
h1 { font-family: "Space Grotesk", "Inter", sans-serif; font-size: clamp(38px, 6vw, 62px); line-height: 1.05; margin: 0 0 20px; font-weight: 700; }
h2 { font-family: "Space Grotesk", "Inter", sans-serif; font-size: clamp(28px, 4vw, 40px); margin: 0 0 18px; font-weight: 700; }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--graphite-soft); max-width: 640px; }

/* ---------- Hero ---------- */
.hero { padding: 120px 0 96px; text-align: center; }
.hero .wrap { display: flex; flex-direction: column; align-items: center; }
.hero .lead { margin: 0 auto 12px; }
.hero .parent-line { color: var(--muted); font-size: 15px; margin-bottom: 32px; }
.hero .parent-line a { color: var(--graphite); font-weight: 600; border-bottom: 1px solid var(--line); }
.hero .parent-line a:hover { border-color: var(--graphite); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------- Projects ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 40px; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(0,0,0,0.06); }
.card .icon {
  width: 56px; height: 56px; min-width: 56px; border-radius: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 18px;
  overflow: hidden;
  flex-shrink: 0;
}
.card .icon img { width: 56px; height: 56px; object-fit: cover; display: block; border-radius: 14px; }
.card h3 { font-size: 22px; margin: 0 0 6px; }
.card .tag { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.card p { color: var(--graphite-soft); font-size: 15px; margin: 0 0 22px; flex: 1; }
.badges { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* App-store style pill badges */
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600; white-space: nowrap;
  text-decoration: none; border: 0;
}
.badge svg { flex-shrink: 0; }
.badge--dark { background: #000; color: #fff; transition: transform .12s ease, box-shadow .15s ease; }
.badge--dark:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,0,0,0.22); }
.badge--muted { background: #f0f0f0; color: var(--muted); cursor: default; }

.card-link { margin-left: auto; font-weight: 600; font-size: 14px; color: var(--graphite); align-self: flex-end; }
.card-link:hover { text-decoration: underline; }

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact a.email { font-family: "Space Grotesk", sans-serif; font-size: clamp(24px, 4vw, 36px); font-weight: 700; border-bottom: 2px solid var(--line); }
.contact a.email:hover { border-color: var(--graphite); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; align-items: center; }
.site-footer a { color: var(--graphite-soft); }
.site-footer a:hover { color: var(--graphite); }

/* ---------- Subpage hero ---------- */
.proj-hero { padding: 72px 0 40px; }
.proj-hero .wrap { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.proj-hero .app-icon { width: 96px; height: 96px; border-radius: 22px; background: var(--bg-alt); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 44px; flex-shrink: 0; overflow: hidden; }
.proj-hero .app-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Feature list */
.features { list-style: none; padding: 0; margin: 28px 0 0; max-width: 680px; }
.features li { position: relative; padding: 10px 0 10px 30px; border-top: 1px solid var(--line); color: var(--graphite-soft); }
.features li:last-child { border-bottom: 1px solid var(--line); }
.features li strong { color: var(--graphite); font-weight: 600; }
.features li::before { content: "→"; position: absolute; left: 0; top: 10px; color: var(--muted); }

/* Screenshot tiles with graceful fallback */
.screen { aspect-ratio: 9/19; border-radius: 20px; overflow: hidden; background: var(--bg-alt); border: 1px solid var(--line); position: relative; }
.screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.screen.empty { border: 1px dashed #dcdcdc; }
.screen.empty img { display: none; }
.screen.empty::after { content: "Screenshot\A coming soon"; white-space: pre; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted); font-size: 13px; }
.proj-body { padding: 20px 0 96px; }
.proj-body p { color: var(--graphite-soft); max-width: 680px; }
.back-link { color: var(--muted); font-size: 14px; font-weight: 600; }
.back-link:hover { color: var(--graphite); }
.screens { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin: 36px 0; }
.screen-ph { aspect-ratio: 9/19; background: var(--bg-alt); border: 1px dashed #dcdcdc; border-radius: 20px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; text-align: center; padding: 12px; }
.legal-links { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; }
.legal-links a { color: var(--graphite-soft); font-size: 14px; border-bottom: 1px solid var(--line); }
.legal-links a:hover { border-color: var(--graphite); }

@media (max-width: 640px) {
  section { padding: 72px 0; }
  .nav-links { display: none; }
  .hero { padding: 84px 0 64px; }
}

.lang-switch { font-size: 14px; color: #888; white-space: nowrap; }
.lang-switch a { color: #888; text-decoration: none; }
.lang-switch a:hover { color: #333; text-decoration: underline; }
.lang-switch strong { color: #333; }
