/* =====================================================================
   ItsaCue Studio — shared frame (global bar, product bar, footer, tokens)
   One file for every page on itsacue.com. Apps override only --app-accent.
   ===================================================================== */
:root {
  /* palette */
  --iq-navy: #0a0d28;
  --iq-navy-deep: #06091e;
  --iq-navy-raised: #111745;
  --iq-line: rgba(255, 255, 255, 0.08);
  --iq-text: #ffffff;
  --iq-muted: #a9aec4;
  --iq-faint: #6f7590;
  --iq-orange: #ff7820;
  /* type */
  --iq-sans: "Geist", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --iq-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --iq-fs-xs: 0.75rem; --iq-fs-sm: 0.8125rem; --iq-fs-md: 0.9375rem; --iq-fs-lg: 1.125rem;
  --iq-fs-xl: clamp(1.6rem, 2.6vw, 2.15rem); --iq-fs-display: clamp(2.6rem, 6.4vw, 5.4rem);
  /* space, radii, motion */
  --iq-s1: 4px; --iq-s2: 8px; --iq-s3: 12px; --iq-s4: 16px; --iq-s5: 24px; --iq-s6: 32px; --iq-s7: 48px; --iq-s8: 72px;
  --iq-r-sm: 10px; --iq-r-md: 16px; --iq-r-lg: 24px; --iq-r-pill: 999px;
  --iq-ease: cubic-bezier(0.23, 1, 0.32, 1);
  --iq-pad: clamp(1.15rem, 3.2vw, 2.75rem);
  --iq-max: 1180px;
  --iq-global-h: 44px;
  --iq-local-h: 52px;
  /* per-app override */
  --app-accent: var(--iq-orange);
  --app-accent-ink: #ffffff;
}

/* ---------- buttons (shared) ---------- */
.iq-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  height: 30px; padding: 0 14px; border-radius: var(--iq-r-pill);
  font: 600 var(--iq-fs-sm)/1 var(--iq-sans); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; transition: background 250ms var(--iq-ease), border-color 250ms var(--iq-ease), color 250ms var(--iq-ease);
}
.iq-btn--primary { background: var(--app-accent); color: var(--app-accent-ink); }
.iq-btn--primary:hover { filter: brightness(1.08); }
.iq-btn--ghost { border-color: rgba(255, 255, 255, 0.18); color: var(--iq-text); }
.iq-btn--ghost:hover { background: #fff; color: var(--iq-navy); }
.iq-btn--soon { background: rgba(255, 255, 255, 0.08); color: var(--iq-muted); cursor: default; }
.iq-btn--soon::before { content: ""; width: 6px; height: 6px; border-radius: 99px; box-shadow: inset 0 0 0 1.5px currentColor; }

/* ---------- global bar (studio level) ---------- */
.iq-global {
  position: relative; z-index: 1001; height: var(--iq-global-h);
  background: var(--iq-navy-deep); color: var(--iq-text);
  font-family: var(--iq-sans); -webkit-font-smoothing: antialiased;
}
.iq-global-inner {
  height: 100%; max-width: var(--iq-max); margin: 0 auto; padding: 0 var(--iq-pad);
  display: flex; align-items: center; justify-content: space-between; gap: var(--iq-s5);
}
.iq-logo { display: inline-flex; align-items: center; color: inherit; text-decoration: none; border-radius: 6px; }
.iq-logo svg { display: block; height: 20px; width: auto; }
.iq-global nav { display: flex; align-items: center; gap: var(--iq-s1); }
.iq-global nav a {
  color: var(--iq-muted); text-decoration: none; font-size: var(--iq-fs-sm); font-weight: 500; letter-spacing: -0.005em;
  padding: 6px 10px; border-radius: var(--iq-r-pill); transition: color 200ms var(--iq-ease);
}
.iq-global nav a:hover, .iq-global nav a[aria-current="page"] { color: var(--iq-text); }
.iq-global :focus-visible, .iq-local :focus-visible, .iq-footer :focus-visible { outline: 2px solid var(--app-accent); outline-offset: 2px; }
/* studio pages: no product bar, so the global bar is the sticky one */
.iq-studio .iq-global { position: sticky; top: 0; height: 56px; border-bottom: 1px solid var(--iq-line); }
.iq-studio .iq-logo svg { height: 24px; }
.iq-studio .iq-global nav a { font-size: var(--iq-fs-md); }

/* ---------- product bar (app level, sticky) ---------- */
.iq-local {
  position: sticky; top: 0; z-index: 1000; height: var(--iq-local-h);
  background: rgba(10, 13, 40, 0.96); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--iq-line); border-bottom: 1px solid var(--iq-line);
  color: var(--iq-text); font-family: var(--iq-sans); -webkit-font-smoothing: antialiased;
}
.iq-local-inner {
  height: 100%; max-width: var(--iq-max); margin: 0 auto; padding: 0 var(--iq-pad);
  display: flex; align-items: center; gap: var(--iq-s5);
}
.iq-app-id { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; margin-right: auto; }
.iq-app-id img { width: 28px; height: 28px; border-radius: 7px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
.iq-app-id span { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.03em; }
.iq-local-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.iq-local-links a {
  display: block; padding: 6px 10px; border-radius: var(--iq-r-pill);
  color: var(--iq-muted); text-decoration: none; font-size: var(--iq-fs-sm); font-weight: 500; transition: color 200ms var(--iq-ease);
}
.iq-local-links a:hover { color: var(--iq-text); }
.iq-local-links a.active, .iq-local-links a[aria-current="page"] { color: var(--iq-text); }
.iq-local-cta { display: flex; align-items: center; gap: var(--iq-s2); }
.iq-local-menu {
  display: none; width: 34px; height: 34px; border: 0; border-radius: 99px; background: transparent; color: var(--iq-text);
  align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.iq-local-menu svg { width: 18px; height: 18px; }
.iq-local .lang-switch > summary { color: var(--iq-muted); background: transparent; font-family: var(--iq-sans); font-size: var(--iq-fs-sm); }
.iq-local .lang-switch > summary:hover { color: var(--iq-text); background: rgba(255, 255, 255, 0.06); }

/* ---------- footer (shared) ---------- */
.iq-footer {
  background: var(--iq-navy-deep); color: var(--iq-muted); font-family: var(--iq-sans); -webkit-font-smoothing: antialiased;
  border-top: 1px solid var(--iq-line);
}
.iq-footer-inner { max-width: var(--iq-max); margin: 0 auto; padding: 0 var(--iq-pad); }
.iq-footer a { color: var(--iq-muted); text-decoration: none; transition: color 200ms var(--iq-ease); }
.iq-footer a:hover { color: var(--iq-text); }
.iq-footer-app {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--iq-s4) var(--iq-s7); align-items: start;
  padding: var(--iq-s7) 0 var(--iq-s6); border-bottom: 1px solid var(--iq-line);
}
.iq-footer-app .iq-app-id span { color: var(--iq-text); }
.iq-footer-app p { margin: var(--iq-s3) 0 0; font-size: var(--iq-fs-sm); line-height: 1.55; max-width: 34rem; color: var(--iq-faint); }
.iq-footer-app nav { display: flex; flex-wrap: wrap; gap: var(--iq-s2) var(--iq-s5); font-size: var(--iq-fs-sm); padding-top: 6px; }
.iq-more { display: flex; align-items: center; flex-wrap: wrap; gap: var(--iq-s3) var(--iq-s5); padding: var(--iq-s6) 0; border-bottom: 1px solid var(--iq-line); }
.iq-more-label { font: 500 var(--iq-fs-xs)/1 var(--iq-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--iq-faint); margin-right: var(--iq-s2); }
.iq-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: var(--iq-r-pill);
  border: 1px solid var(--iq-line); background: rgba(255, 255, 255, 0.02); font-size: var(--iq-fs-sm);
}
.iq-chip img { width: 26px; height: 26px; border-radius: 7px; }
.iq-chip b { color: var(--iq-text); font-weight: 600; letter-spacing: -0.02em; }
.iq-chip small { color: var(--iq-faint); font-size: var(--iq-fs-xs); }
.iq-chip--all { padding: 8px 14px; }
.iq-footer-base {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--iq-s3) var(--iq-s5);
  padding: var(--iq-s5) 0 var(--iq-s6); font-size: var(--iq-fs-sm);
}
.iq-footer-base .iq-logo svg { height: 16px; opacity: 0.9; }
.iq-footer-base .iq-copy { display: inline-flex; align-items: center; gap: var(--iq-s3); color: var(--iq-faint); }
.iq-footer-base nav { display: flex; flex-wrap: wrap; gap: var(--iq-s2) var(--iq-s5); }

/* ---------- app pages: align the app templates to the frame ---------- */
html.iq-app { --nav-h: var(--iq-local-h); }
html.iq-app body, html.iq-app h1, html.iq-app h2, html.iq-app h3, html.iq-app h4, html.iq-app h5,
html.iq-app .btn, html.iq-app input, html.iq-app button, html.iq-app textarea, html.iq-app select { font-family: var(--iq-sans); }
html.iq-app h1, html.iq-app h2 { letter-spacing: -0.045em; }
html.iq-app .eyebrow { font-family: var(--iq-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.08em; }
html.iq-app .hero { padding-top: 72px; min-height: min(calc(100vh - var(--iq-global-h) - var(--iq-local-h)), 900px); }
html.iq-app .page-hero { padding-top: 72px; }
@media (max-width: 640px) { html.iq-app .hero { padding-top: 48px; } html.iq-app .page-hero { padding-top: 56px; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .iq-local-links, .iq-local .lang-switch-desktop { display: none; }
  .iq-local-menu { display: inline-flex; }
  .iq-local-inner { gap: var(--iq-s3); }
}
@media (max-width: 640px) {
  .iq-studio .iq-global { height: 52px; }
  .iq-studio .iq-logo svg { height: 22px; }
  .iq-footer-app { grid-template-columns: 1fr; padding-top: var(--iq-s6); }
  .iq-footer-base { flex-direction: column; align-items: flex-start; }
  .iq-more-label { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .iq-btn, .iq-global nav a, .iq-local-links a, .iq-footer a { transition: none; }
}

/* ---------- starter layer for new app pages (template/) ---------- */
body.iq-page { margin: 0; background: var(--iq-navy); color: var(--iq-text); font-family: var(--iq-sans); -webkit-font-smoothing: antialiased; }
.iq-hero {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(4.5rem, 12vh, 8rem) var(--iq-pad) clamp(4rem, 10vh, 7rem);
}
.iq-hero::before {
  content: ""; position: absolute; inset: -30% -10% auto; height: 120%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--app-accent) 16%, transparent), transparent 70%);
}
.iq-hero > * { position: relative; }
.iq-hero-icon { width: 112px; height: 112px; border-radius: 25px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08); }
.iq-hero h1 { margin: var(--iq-s6) 0 var(--iq-s3); font-size: var(--iq-fs-display); line-height: 0.98; letter-spacing: -0.055em; }
.iq-hero p { margin: 0 auto var(--iq-s6); max-width: 34rem; color: var(--iq-muted); font-size: var(--iq-fs-lg); line-height: 1.5; }
.iq-hero .iq-btn { height: 44px; padding: 0 22px; font-size: var(--iq-fs-md); }
.iq-section { max-width: 58rem; margin: 0 auto; padding: var(--iq-s8) var(--iq-pad); border-top: 1px solid var(--iq-line); }

/* Light studio pages (privacy, 404): breathing room under the bar */
.iq-studio.iq-light main { padding-top: var(--iq-s7, 64px); padding-bottom: var(--iq-s7, 64px); }
.iq-studio.iq-light.iq-404 main { min-height: calc(100vh - 56px - 220px); }

/* Connected scripts (Arabic, Persian, Urdu): no tracking, no mono eyebrow */
html.iq-app[dir="rtl"] h1, html.iq-app[dir="rtl"] h2, html.iq-app[dir="rtl"] .eyebrow { letter-spacing: 0; }
html.iq-app[dir="rtl"] .eyebrow { font-family: inherit; font-weight: 600; }
/* English studio strings inside RTL pages keep their own order (© 2026 ItsaCue Studio, All apps →) */
html[dir="rtl"] .iq-copy, html[dir="rtl"] .iq-chip--all { direction: ltr; unicode-bidi: isolate; }
