/* ===========================================================
   Multivac App Studio — shared styles
   =========================================================== */

:root {
  --bg: #08080c;
  --bg-elev: #121218;
  --bg-elev-2: #1a1a22;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f5f7;
  --text-dim: #a3a3ad;
  --text-dimmer: #6e6e78;

  --c1: #22c55e; /* green */
  --c2: #eab308; /* yellow */
  --c3: #f97316; /* orange */
  --c4: #ec4899; /* pink/red */
  --c5: #8b5cf6; /* purple */
  --c6: #3b82f6; /* blue */

  --accent-gradient: linear-gradient(100deg, var(--c1), var(--c2), var(--c3), var(--c4), var(--c5), var(--c6));
  --accent-gradient-soft: linear-gradient(100deg,
    rgba(34, 197, 94, 0.5), rgba(234, 179, 8, 0.5), rgba(249, 115, 22, 0.5),
    rgba(236, 72, 153, 0.5), rgba(139, 92, 246, 0.5), rgba(59, 130, 246, 0.5));

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --maxw: 1120px;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

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

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

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

/* ---------- Gradient text / accents ---------- */

.grad-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.grad-bar {
  height: 3px;
  width: 56px;
  border-radius: 999px;
  background: var(--accent-gradient);
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(8, 8, 12, 0.6);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav-brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.nav-links a.active { color: var(--text); background: rgba(255,255,255,0.08); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; width: 18px; }
.nav-toggle span::after { position: absolute; top: 6px; width: 18px; }

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(10, 10, 14, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a { padding: 14px 10px; border-radius: 10px; font-size: 16px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--text);
  color: #08080c;
}
.btn-primary:hover { opacity: 0.88; }

.btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: rgba(255,255,255,0.09); }

.btn-store {
  background: #0a0a0a;
  color: #fff;
  border: 1px solid var(--border-strong);
  padding: 10px 20px 10px 16px;
}
.btn-store:hover { background: #161616; }
.btn-store svg { width: 20px; height: 20px; }

/* ---------- Hero (home) ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("../images/hero-banner.jpg");
  background-size: cover;
  background-position: center 35%;
  transform: scale(1.06);
  filter: saturate(0.9);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6,6,10,0.55) 0%, rgba(6,6,10,0.72) 45%, rgba(6,6,10,0.94) 100%),
    radial-gradient(ellipse at 50% 30%, rgba(6,6,10,0.25) 0%, rgba(6,6,10,0.75) 70%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.hero-logo {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.12);
  margin-bottom: 4px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 12px;
  overflow: hidden;
}

.hero-eyebrow .nowrap-unit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  transform-origin: center;
}

.hero-eyebrow .apple-glyph {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.nav-links a.x-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  margin-left: 4px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.x-link svg { width: 17px; height: 17px; display: block; }
.nav-links a.x-link:hover { background: rgba(255,255,255,0.14); border-color: var(--border-strong); color: var(--text); }

.x-link-inline {
  display: inline-flex;
  align-items: center;
}

.hero h1 {
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.hero p.lede {
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--text-dim);
  max-width: 560px;
  margin: 0;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dimmer);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: floaty 2.2s ease-in-out infinite;
}
.scroll-hint svg { width: 16px; height: 16px; opacity: 0.7; }

@keyframes floaty {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

/* ---------- Sections ---------- */

section { position: relative; }

.section {
  padding: 96px 24px;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.eyebrow {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}

.section-head h2 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.section-head p {
  color: var(--text-dim);
  font-size: 16px;
  margin: 0;
}

/* Philosophy / about block on home */

.philosophy {
  background: var(--bg);
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.philosophy-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
}

.philosophy-card .icon-dot {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-gradient);
  margin-bottom: 16px;
}

.philosophy-card h3 {
  font-size: 17px;
  font-weight: 650;
  margin: 0 0 8px;
}

.philosophy-card p {
  font-size: 14.5px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.6;
}

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

/* Home preview of apps */

.apps-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: var(--maxw);
  margin: 0 auto;
}

@media (max-width: 720px) {
  .apps-preview-grid { grid-template-columns: 1fr; }
}

.app-preview-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.app-preview-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-elev-2);
  transform: translateY(-2px);
}

.app-preview-card img {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.app-preview-card .body { flex: 1; min-width: 0; }
.app-preview-card h3 { margin: 0 0 4px; font-size: 17px; font-weight: 650; }
.app-preview-card .sub { margin: 0; font-size: 13.5px; color: var(--text-dim); }
.app-preview-card .arrow { color: var(--text-dimmer); flex-shrink: 0; }

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
}

.footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  overflow: hidden;
}

.footer-copy {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-dimmer);
  white-space: nowrap;
  transform-origin: left center;
  flex-shrink: 1;
  min-width: 0;
}

.x-link-big {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.x-link-big:hover { background: rgba(255,255,255,0.14); border-color: var(--border-strong); }
.x-link-big svg { width: 20px; height: 20px; display: block; }

@media (max-width: 420px) {
  .x-link-big { width: 36px; min-width: 36px; height: 36px; }
  .x-link-big svg { width: 16px; height: 16px; }
  .footer .wrap { gap: 10px; }
}

/* ---------- Page hero (non-home pages) ---------- */

.page-hero {
  padding: 156px 24px 56px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 700px 320px at 50% -10%, rgba(167,139,250,0.12), transparent 60%);
}

.page-hero .eyebrow { justify-content: center; }
.page-hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 10px 0 0;
}
.page-hero p {
  color: var(--text-dim);
  max-width: 560px;
  margin: 14px auto 0;
  font-size: 16px;
}

/* ---------- Products page: app blocks ---------- */

.app-block {
  max-width: var(--maxw);
  margin: 0 auto 64px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  overflow: hidden;
}

.app-block-head {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 32px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.app-block-head img {
  width: 84px;
  height: 84px;
  flex-shrink: 0;
}

.app-block-head .info { flex: 1; min-width: 200px; }
.app-block-head h2 { margin: 0 0 4px; font-size: 22px; font-weight: 700; }
.app-block-head .sub { margin: 0; color: var(--text-dim); font-size: 14.5px; }

.app-block-head .head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 1;
  min-width: 0;
  max-width: 100%;
}

.app-block-head .price-tag {
  display: inline-block;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  text-align: right;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
}

@media (max-width: 600px) {
  .app-block-head .head-actions {
    width: 100%;
    align-items: flex-start;
  }
  .app-block-head .price-tag { text-align: left; }
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 8px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.tab-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
  font-family: inherit;
}
.tab-btn:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.tab-btn.active { color: #08080c; background: var(--text); }

.tab-panel { display: none; padding: 32px; }
.tab-panel.active { display: block; }

.tab-panel h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 28px 0 10px;
  letter-spacing: -0.01em;
}
.tab-panel h3:first-child { margin-top: 0; }

.tab-panel p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 14px;
}

.tab-panel ul {
  margin: 0 0 14px;
  padding-left: 20px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.8;
}

.tab-panel .legal-meta {
  font-size: 12.5px;
  color: var(--text-dimmer);
  margin-bottom: 24px;
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 18px 0 20px;
}
@media (max-width: 600px) { .stage-grid { grid-template-columns: 1fr; } }

.stage-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  background: rgba(255,255,255,0.02);
}
.stage-card .num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dimmer);
  text-transform: uppercase;
}
.stage-card h4 { margin: 6px 0 4px; font-size: 15px; font-weight: 650; }
.stage-card p { margin: 0; font-size: 13.5px; color: var(--text-dim); }

.overview-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* Official Apple "Download on the App Store" badge */
.appstore-badge {
  display: inline-flex;
  line-height: 0;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}
.appstore-badge:hover { opacity: 0.8; }
.appstore-badge img {
  height: 44px;
  width: auto;
  display: block;
}

/* Screenshot gallery, App-Store style horizontal scroll */
.screenshot-gallery {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 2px 2px 14px;
  margin: 0 0 22px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.screenshot-gallery img {
  height: 340px;
  width: auto;
  flex-shrink: 0;
  border-radius: 18px;
  border: 1px solid var(--border);
  scroll-snap-align: start;
  background: var(--bg-elev-2);
}
.screenshot-gallery::-webkit-scrollbar { height: 6px; }
.screenshot-gallery::-webkit-scrollbar-track { background: transparent; }
.screenshot-gallery::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
}
@media (max-width: 600px) {
  .screenshot-gallery img { height: 260px; }
}

.note-box {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  font-size: 13.5px;
  color: var(--text-dimmer);
  line-height: 1.6;
}

/* ---------- Contact page ---------- */

.contact-grid {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 640px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.contact-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }

.contact-card .icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.contact-card .icon-wrap svg { width: 22px; height: 22px; color: #08080c; }

.contact-card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 650; }
.contact-card p { margin: 0 0 14px; font-size: 14px; color: var(--text-dim); }
.contact-card a.link-out { font-size: 14px; font-weight: 600; color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.contact-card a.link-out:hover { color: var(--c4); }

.faq-block {
  max-width: 760px;
  margin: 56px auto 0;
}
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 2px;
}
.faq-item h4 { margin: 0 0 6px; font-size: 15px; font-weight: 650; }
.faq-item p { margin: 0; font-size: 14px; color: var(--text-dim); line-height: 1.65; }

/* ---------- Utility ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }
