/* Nice Apps Studio — shared styles */
@import url("/fonts/plus-jakarta-sans.css");
@import url("/brand-tokens.css");

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

html {
  scroll-behavior: smooth;
}

html {
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 10% 0%, var(--mesh-a), transparent 55%),
    radial-gradient(ellipse 60% 45% at 90% 10%, var(--mesh-b), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, var(--mesh-c), transparent 55%),
    var(--bg);
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--accent-2);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.header-home {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.header-home:hover,
.header-home.is-active {
  color: var(--text);
  background: rgba(148, 163, 184, 0.1);
}

.nav-cta {
  font-weight: 600 !important;
  color: #0f172a !important;
  background: var(--gradient-hero) !important;
  padding: 10px 16px !important;
}

.nav-cta:hover {
  color: #0f172a !important;
  filter: brightness(1.06);
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  color: #0f172a;
  background: var(--gradient-hero);
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.35);
  transition: transform 0.2s, filter 0.2s;
}

.btn-cta:hover {
  color: #0f172a;
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.btn-cta:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.hero__actions {
  margin-top: 28px;
}

.founder {
  max-width: 42em;
  margin: 0 auto 56px;
  padding: 28px 24px;
  text-align: center;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.founder h2 {
  font-family: var(--font);
  font-size: 1.45rem;
  margin: 0 0 12px;
}

.founder p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.02rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.site-logo:hover {
  color: var(--text);
}

.site-logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav > a,
.nav-parent {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
  background: transparent;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.site-nav > a:hover,
.site-nav > a.is-active,
.nav-parent:hover,
.nav-item.is-open > .nav-parent {
  color: var(--text);
  background: rgba(148, 163, 184, 0.1);
}

.nav-item {
  position: relative;
}

.nav-parent::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  border: 4px solid transparent;
  border-top-color: currentColor;
  border-bottom-width: 0;
  vertical-align: 0.15em;
}

.nav-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  padding: 10px 8px 8px;
  border-radius: 14px;
  background: rgba(15, 22, 40, 0.96);
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 120;
}

/* Invisible bridge so the pointer can move from label → items without closing */
.nav-submenu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.nav-item.is-open > .nav-submenu,
.nav-item:hover > .nav-submenu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-submenu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.nav-submenu a:hover,
.nav-submenu a.is-active {
  color: var(--text);
  background: rgba(148, 163, 184, 0.12);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 20px;
    background: rgba(7, 11, 20, 0.96);
    border-bottom: 1px solid var(--border);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-header__inner {
    position: relative;
    flex-wrap: wrap;
  }

  .nav-item:hover > .nav-submenu {
    display: none;
  }

  .nav-item.is-open > .nav-submenu {
    display: flex;
  }

  .nav-submenu {
    position: static;
    margin: 4px 0 8px 8px;
    box-shadow: none;
    min-width: 0;
  }
}

/* —— Layout —— */
.page-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* —— Hero —— */
.hero {
  padding: 40px 0 56px;
  text-align: center;
}

.hero__logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  max-width: 420px;
  padding: 28px 32px;
  border-radius: calc(var(--radius) + 8px);
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero__logo {
  width: min(100%, 320px);
  height: auto;
  max-height: 280px;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
}

.hero__eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 10px;
}

.hero h1 {
  font-family: var(--font);
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.03em;
}

.hero__tagline {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 36em;
  margin: 0 auto;
  line-height: 1.6;
}

/* —— Values —— */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 56px;
}

@media (max-width: 768px) {
  .values {
    grid-template-columns: 1fr;
  }
}

.value-card {
  padding: 22px 20px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.value-card strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--text);
}

.value-card span {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* —— App showcase —— */
.section-title {
  font-family: var(--font);
  font-size: 1.65rem;
  font-weight: 600;
  margin: 0 0 28px;
  letter-spacing: -0.02em;
}

.app-showcase {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-bottom: 64px;
}

.app-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 28px;
  border-radius: calc(var(--radius) + 4px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
}

.app-card--reverse .app-card__media {
  order: 2;
}

.app-card--reverse .app-card__body {
  order: 1;
}

@media (max-width: 860px) {
  .app-card,
  .app-card--reverse .app-card__media,
  .app-card--reverse .app-card__body {
    grid-template-columns: 1fr;
    order: unset;
  }
}

.app-card__media {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.app-card__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.app-card__media--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: var(--surface);
}

.app-card__media--icon img {
  width: min(100%, 200px);
  aspect-ratio: 1;
  border-radius: 28px;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.app-card__media--placeholder {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #1e3a5f 0%, #0f766e 50%, #4c1d95 100%);
  padding: 32px;
}

.app-card__media--placeholder svg {
  width: 88px;
  height: 88px;
  opacity: 0.9;
}

.app-card__body h3 {
  font-family: var(--font);
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.app-card__body p {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 1.02rem;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-warm);
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.play-badge {
  display: inline-block;
  line-height: 0;
  transition: transform 0.2s, opacity 0.2s;
}

.play-badge:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.play-badge img {
  height: 52px;
  width: auto;
}

.meta-links {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.meta-links a {
  font-weight: 500;
}

.meta-links .sep {
  margin: 0 8px;
  opacity: 0.4;
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px 48px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
}

.site-footer a {
  margin: 0 10px;
  font-weight: 500;
}

/* —— App-scoped header (one app only) —— */
.app-header .site-logo span {
  font-weight: 600;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.app-nav a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 999px;
}

.app-nav a:hover,
.app-nav a.is-active {
  color: var(--text);
  background: rgba(148, 163, 184, 0.1);
}

/* —— Legal / doc pages (no cross-app menus) —— */
body.legal-page {
  background: var(--bg-deep);
}

.legal-header {
  border-bottom: 1px solid var(--border);
  background: rgba(7, 11, 20, 0.9);
}

.legal-header__inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.legal-header__home {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 999px;
}

.legal-header__home:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.1);
}

.legal-header__app {
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.legal-header__app:hover {
  color: var(--accent);
}

.legal-tabs {
  display: flex;
  gap: 4px;
}

.legal-tabs a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 999px;
}

.legal-tabs a:hover,
.legal-tabs a.is-active {
  color: var(--text);
  background: rgba(148, 163, 184, 0.12);
}

.legal-doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.legal-doc .effective {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 24px;
}

.legal-doc h1 {
  font-family: var(--font);
  font-size: 1.85rem;
  margin: 0 0 12px;
}

.legal-doc h2 {
  font-size: 1.15rem;
  margin: 32px 0 12px;
  color: var(--text);
}

.legal-doc h3 {
  font-size: 1rem;
  margin: 20px 0 8px;
}

.legal-doc p,
.legal-doc li {
  color: var(--text-muted);
}

.legal-doc ul,
.legal-doc ol {
  padding-left: 1.35rem;
}

.legal-doc .subtitle {
  color: var(--text-muted);
  margin-bottom: 28px;
}

.legal-doc iframe {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 16px;
  background: #fff;
}

.legal-form-link {
  display: inline-block;
  padding: 10px 18px;
  background: var(--accent-2);
  color: #0f172a !important;
  border-radius: 10px;
  font-weight: 600;
}

.legal-form-link:hover {
  background: var(--accent);
  color: #0f172a !important;
}

.legal-back {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* —— App subpage hero —— */
.app-hero {
  padding: 48px 0 32px;
  max-width: 720px;
}

.app-hero h1 {
  font-family: var(--font);
  font-size: 2.25rem;
  margin: 0 0 16px;
}

.app-hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 24px;
}

/* —— 404 —— */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
}

.error-page h1 {
  font-family: var(--font);
  font-size: 4rem;
  margin: 0;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* App page screenshot strip (Call Reminder) */
.app-shots {
  margin: 0 0 40px;
}

.app-shots__title {
  margin: 0 0 16px;
  font-size: 1.25rem;
}

.app-shots__row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.app-shots__row img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
}

@media (max-width: 720px) {
  .app-shots__row {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 62%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }

  .app-shots__row img {
    scroll-snap-align: start;
  }
}
