/* ==========================================================================
   Ingenio Productions — Design System
   Dark premium studio theme. Space Grotesk / Inter / IBM Plex Mono.
   ========================================================================== */

/* ---- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body { line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

/* ---- Tokens --------------------------------------------------------------- */
:root {
  --bg:        #090b10;
  --bg-2:      #0c0f16;
  --bg-3:      #0f131c;
  --panel:     #10131c;
  --ink:       #eef1f8;
  --ink-2:     rgba(238, 241, 248, 0.66);
  --ink-3:     rgba(238, 241, 248, 0.52);
  --ink-4:     rgba(238, 241, 248, 0.48);
  --line:      rgba(255, 255, 255, 0.09);
  --line-2:    rgba(255, 255, 255, 0.055);

  --brand:     #8b8cf9;   /* indigo   */

  --accent:    var(--brand);   /* per-section override */

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  --container: 1180px;
  --radius:    18px;
  --radius-sm: 12px;
  --shadow:    0 24px 60px rgba(0, 0, 0, 0.45), 0 6px 18px rgba(0, 0, 0, 0.3);
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
}

html { color-scheme: dark; background: var(--bg); }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

/* ---- Layout helpers ------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.5rem; }
.section { padding-block: clamp(4.5rem, 9vw, 8rem); position: relative; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}
.eyebrow.centered { justify-content: center; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; }
.lede { color: var(--ink-2); font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.65; }

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s;
  will-change: transform;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn-primary {
  color: #0a0b10;
  background: var(--ink);
}
.btn-primary:hover { transform: translateY(-2px); background: #ffffff; }
.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.22); background: rgba(255, 255, 255, 0.07); }

/* ---- Store badges --------------------------------------------------------- */
.badge-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.store-badge {
  display: inline-flex;
  height: 46px;
  border-radius: 10px;
  transition: transform 0.25s var(--ease), filter 0.25s;
  will-change: transform;
}
.store-badge img { height: 100%; width: auto; }
.store-badge:hover { transform: translateY(-2px); filter: brightness(1.08); }
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  font-weight: 500;
  transition: gap 0.25s var(--ease), opacity 0.2s;
}
.link-arrow svg { width: 0.9em; height: 0.9em; transition: transform 0.25s var(--ease); }
.link-arrow:hover { opacity: 0.85; }
.link-arrow:hover svg { transform: translate(2px, -2px); }

/* ---- Background field ----------------------------------------------------- */
.bg-field { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-field .grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 75%);
}

/* ---- Header / nav --------------------------------------------------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding-block: 0.9rem; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; }
.brand .mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand .wordmark { line-height: 1; }
.brand .wordmark b { font-family: var(--font-display); font-weight: 700; font-size: 1.06rem; letter-spacing: -0.02em; color: var(--ink); }
.brand .wordmark span {
  display: block; font-family: var(--font-mono); font-size: 0.56rem; font-weight: 500;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-3); margin-top: 3px;
}
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links .nav-cta {
  font-family: var(--font-body); text-transform: none; letter-spacing: -0.01em;
  font-size: 0.9rem; font-weight: 600; color: var(--ink);
  padding: 0.5rem 1rem; border: 1px solid var(--line); border-radius: 999px;
  transition: border-color 0.2s, background 0.2s;
}
.nav-links .nav-cta:hover { border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.05); }
.nav-toggle { display: none; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line); }
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform 0.3s, opacity 0.2s; }
.nav-toggle span + span { margin-top: 4.5px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---- Hero ----------------------------------------------------------------- */
.hero { padding-top: clamp(9rem, 16vh, 12rem); padding-bottom: clamp(4rem, 8vw, 7rem); text-align: center; }
.hero .pill {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.4rem 0.9rem 0.4rem 0.55rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.03);
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: 1.8rem;
}
.hero .pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.hero h1 { font-size: clamp(2.6rem, 6.6vw, 5rem); letter-spacing: -0.035em; margin-bottom: 1.5rem; }
.hero p.lede { max-width: 40ch; margin: 0 auto 2.4rem; }
.hero-cta { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

/* App chips marquee under hero */
.app-chips { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; margin-top: 3.5rem; }
.app-chips a {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 1rem 0.55rem 0.6rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.028);
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.app-chips a:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.06); }
.app-chips img { width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0; }
.app-chips span { font-size: 0.85rem; font-weight: 600; letter-spacing: -0.01em; }
.app-chips small { font-family: var(--font-mono); font-size: 0.62rem; color: var(--ink-3); letter-spacing: 0.05em; }

/* ---- Section heading ------------------------------------------------------ */
.section-head { max-width: 640px; }
.section-head.centered { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin: 1rem 0 0.9rem; }
.section-head p { color: var(--ink-2); font-size: 1.05rem; }
.section-head p + p { margin-top: 1rem; }
.domains { display: flex; flex-wrap: wrap; gap: 0.55rem; justify-content: center; margin-top: 2.4rem; max-width: 620px; margin-inline: auto; }
.domains span {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.07em;
  padding: 0.5rem 0.9rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.025); color: var(--ink-2);
}

/* ---- Product feature rows ------------------------------------------------- */
.products { display: flex; flex-direction: column; gap: clamp(4rem, 8vw, 7rem); margin-top: clamp(3rem, 6vw, 5rem); }
.product {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.product.reverse .product-media { order: 2; }
.product-content .kicker {
  display: inline-flex; align-items: center; gap: 0.55rem; margin-bottom: 1.1rem;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
}
.product-content .kicker .rating {
  display: inline-flex; align-items: center; gap: 0.32rem;
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.06em;
  color: var(--ink-2); text-transform: none;
}
.product-content .kicker .rating svg { width: 0.85em; height: 0.85em; color: #f6b93b; }
.product-content .kicker .rating b { color: var(--ink); font-weight: 600; }
.product-content .kicker .badge-tag {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em;
  padding: 0.15rem 0.5rem; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.product-content h3 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 1rem; }
.product-content h3 a { transition: color 0.2s; }
.product-content h3 a:hover { color: var(--accent); }
.product-content > p { color: var(--ink-2); font-size: 1.02rem; line-height: 1.7; margin-bottom: 1.4rem; }
.feature-list { list-style: none; padding: 0; display: grid; gap: 0.65rem; margin-bottom: 1.8rem; }
.feature-list li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--ink-2); font-size: 0.95rem; line-height: 1.5; }
.feature-list li svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; margin-top: 0.15rem; color: var(--accent); }
.product-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; }

/* Media frames */
.product-media { position: relative; }
.frame {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow);
}
.frame::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06); pointer-events: none;
}

/* PassStamp branded panel (icon-led) */
.brand-panel {
  border-radius: var(--radius); border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 80% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 62%),
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 8%, #0b1018), #090c12);
  padding: clamp(1.8rem, 4vw, 2.6rem); box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.brand-panel .ps-icon {
  width: clamp(96px, 24vw, 140px); height: clamp(96px, 24vw, 140px);
  border-radius: 26px; border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5); margin-bottom: 1.6rem;
}
.brand-panel h4 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.brand-panel .ps-tag { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-top: 0.35rem; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin-top: 1.8rem; }
.stat-grid .stat {
  border: 1px solid var(--line-2); border-radius: 12px; padding: 0.9rem 0.75rem;
  background: rgba(255,255,255,0.02); text-align: center;
}
.stat-grid .stat b { display: block; font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: #eaf1ff; }
.stat-grid .stat span { font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); line-height: 1.3; display: block; margin-top: 0.3rem; }

/* Phone frame for screenshots */
.phone {
  position: relative; margin-inline: auto; width: min(300px, 78%);
  border-radius: 40px; padding: 10px;
  background: linear-gradient(160deg, #23262f, #0c0e13);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow);
}
.phone::before {
  content: ""; position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 42%; height: 20px; background: #05070b; border-radius: 0 0 14px 14px; z-index: 2;
}
.phone img { width: 100%; border-radius: 30px; display: block; }

.tablet { position: relative; }
.tablet img { width: 100%; border-radius: var(--radius); }

/* ---- Studio / values ------------------------------------------------------ */
.studio { border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); background: var(--bg-2); }
/* ---- Contact CTA ---------------------------------------------------------- */
.cta-wrap { text-align: center; position: relative; }
.cta-card {
  position: relative; border-radius: 28px; overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--bg-3), var(--bg));
  padding: clamp(3rem, 7vw, 5.5rem) 1.5rem;
}
.cta-card h2 { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 1rem; }
.cta-card p { color: var(--ink-2); max-width: 46ch; margin: 0 auto 2.2rem; font-size: 1.08rem; }

/* ---- Footer --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 3.5rem 2.5rem; background: var(--bg); }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.footer-brand p { color: var(--ink-3); font-size: 0.92rem; max-width: 34ch; margin-top: 1rem; line-height: 1.6; }
.footer-col h5 { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1.1rem; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 0.7rem; }
.footer-col a { color: var(--ink-2); font-size: 0.92rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.8rem; border-top: 1px solid var(--line-2); }
.footer-bottom p { color: var(--ink-4); font-size: 0.82rem; }
.footer-bottom p a { color: var(--ink-3); margin-left: 0.5rem; }
.footer-bottom p a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.social { display: flex; gap: 0.6rem; }
.social a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); color: var(--ink-2); transition: color 0.2s, border-color 0.2s, transform 0.2s; }
.social a:hover { color: var(--ink); border-color: rgba(255,255,255,0.25); transform: translateY(-2px); }
.social svg { width: 17px; height: 17px; }

/* ---- Scroll reveal -------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* ---- Responsive ----------------------------------------------------------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header.menu-open .nav-links {
    display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start;
    gap: 1.3rem; padding: 1.6rem 1.5rem 2rem; background: color-mix(in srgb, var(--bg) 97%, transparent);
    backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
  }
  .site-header.menu-open .nav-links a { font-size: 0.9rem; }
  .product, .product.reverse .product-media { grid-template-columns: 1fr; order: 0; }
  .product-media { order: -1 !important; max-width: 460px; margin-inline: auto; width: 100%; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}
