/* =========================================
   Chapter Networks — Global Stylesheet
   Premium dark editorial aesthetic
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Outfit:wght@300;400;500;600&display=swap');

:root {
  --bg:           #080808;
  --bg-surface:   #121212;
  --bg-card:      #1a1a1a;
  --border:       #2a2a2a;
  --border-light: #1e1e1e;
  --text:         #f0ece4;
  --text-muted:   #7a7670;
  --text-subtle:  #3e3c3a;
  --accent:       #c8a462;
  --accent-glow:  rgba(200,164,98,0.15);
  --accent-2:     #4f8ef7;
  --accent-2-glow: rgba(79,142,247,0.12);
  --success:      #4cad7c;
  --radius-sm:    6px;
  --radius:       12px;
  --radius-lg:    20px;
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:    'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow-card:  0 1px 3px rgba(0,0,0,0.5), 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow:  0 0 60px rgba(200,164,98,0.08);
  --transition:   0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

/* RTL support */
[dir="rtl"] { direction: rtl; }
[dir="rtl"] .nav-links { flex-direction: row-reverse; }
[dir="rtl"] .hero-badge { flex-direction: row-reverse; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }
ul { list-style: none; }

/* ---- Typography ---- */
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.display-lg {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.1;
}
.display-md {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 300;
  line-height: 1.2;
}
h4 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
p { font-size: 1rem; line-height: 1.75; color: var(--text-muted); }
p.lead { font-size: 1.125rem; line-height: 1.7; color: var(--text); opacity: 0.85; }

/* ---- Layout Utilities ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1.5rem, 5vw, 4rem); }
.container-wide { max-width: 1440px; margin: 0 auto; padding: 0 clamp(1.5rem, 5vw, 4rem); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; }
.text-center { text-align: center; }
.section { padding: clamp(5rem, 10vw, 9rem) 0; }
.section-sm { padding: clamp(3rem, 6vw, 5rem) 0; }

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  padding: 1.25rem 0;
  transition: background var(--transition), backdrop-filter var(--transition), border-color var(--transition);
}
.nav.scrolled {
  background: rgba(8,8,8,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.nav-logo-mark {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--bg);
  font-weight: 600;
}
.nav-logo-text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text);
}
.nav-logo-sub {
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  line-height: 1;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav-links a {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}
/* Language Selector */
.lang-select {
  appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.lang-select:hover { border-color: var(--accent); color: var(--text); }
.lang-select option { background: #1a1a1a; color: var(--text); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--text);
  transition: transform var(--transition), opacity var(--transition);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #080808;
  border: 1px solid var(--accent);
}
.btn-primary:hover {
  background: #d4b474;
  box-shadow: 0 4px 24px rgba(200,164,98,0.3);
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--text-muted);
  background: rgba(255,255,255,0.04);
}
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid transparent;
  padding-left: 0; padding-right: 0;
}
.btn-ghost:hover { opacity: 0.75; }
.btn-ghost svg { transition: transform var(--transition); }
.btn-ghost:hover svg { transform: translateX(4px); }
.btn-appstore {
  background: var(--text);
  color: var(--bg);
  border: 1px solid transparent;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
}
.btn-appstore:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(200,164,98,0.25);
}

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--shadow-card);
}
.card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  transform: translateY(-3px);
}

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 90px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 60% 20%, rgba(200,164,98,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(79,142,247,0.04) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, #0c0c0c 100%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 100% 100% at 50% 0%, black 0%, transparent 70%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: clamp(4rem, 10vh, 8rem) 0;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(200,164,98,0.1);
  border: 1px solid rgba(200,164,98,0.25);
  border-radius: 100px;
  padding: 0.35rem 1rem 0.35rem 0.5rem;
  margin-bottom: 2rem;
}
.hero-badge-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.hero-badge span {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.75;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 3rem;
  margin-top: 5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-light);
}
.hero-stat-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--text);
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* ---- Section Headers ---- */
.section-header {
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.section-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text);
}
.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-top: 1rem;
  line-height: 1.75;
}

/* ---- App Cards ---- */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}
.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.app-card:hover {
  border-color: var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 60px var(--card-glow, rgba(200,164,98,0.06));
  transform: translateY(-4px);
}
.app-card-header {
  padding: 2rem 2rem 1.5rem;
  position: relative;
}
.app-icon {
  width: 64px; height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  font-weight: 300;
  font-family: var(--font-display);
}
.app-icon-pdhd   { background: linear-gradient(135deg,#1a2a4a,#2a4a8a); color: #6fa8f5; }
.app-icon-cost   { background: linear-gradient(135deg,#1a3a2a,#2a6a4a); color: #5ac887; }
.app-icon-week   { background: linear-gradient(135deg,#3a1a2a,#7a2a5a); color: #f57ab0; }
.app-icon-aws    { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: #f5a623; }

.app-name {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}
.app-category {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.app-card-body {
  padding: 0 2rem 1.5rem;
  flex: 1;
}
.app-screenshots {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
  text-decoration: none;
  cursor: pointer;
}
.app-screenshots img {
  width: 100%;
  max-height: 220px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  object-fit: contain;
  transition: border-color var(--transition);
}
.app-screenshots:hover img {
  border-color: var(--accent);
  filter: brightness(1.1);
}
.app-screenshot-placeholder {
  height: 140px;
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-subtle);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}
.app-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.app-features {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.app-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.app-feature::before {
  content: '';
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}
.app-card-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.app-platforms {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.25rem 0.6rem;
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  font-weight: 500;
}

/* ---- AI Consulting Section ---- */
.ai-section {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}
.ai-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 100% at 100% 50%, rgba(79,142,247,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.ai-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}
.ai-visual {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-orb {
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(79,142,247,0.3), rgba(79,142,247,0.05) 60%, transparent);
  border: 1px solid rgba(79,142,247,0.2);
  animation: orb-float 6s ease-in-out infinite;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-orb::before {
  content: '';
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 1px solid rgba(79,142,247,0.15);
}
.ai-orb::after {
  content: '';
  position: absolute;
  inset: 45px;
  border-radius: 50%;
  border: 1px solid rgba(79,142,247,0.1);
}
.ai-orb-label {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--accent-2);
  font-weight: 300;
  letter-spacing: 0.05em;
  text-align: center;
}
@keyframes orb-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.ai-services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
.ai-service-item {
  background: rgba(79,142,247,0.05);
  border: 1px solid rgba(79,142,247,0.12);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color var(--transition), background var(--transition);
}
.ai-service-item:hover {
  background: rgba(79,142,247,0.09);
  border-color: rgba(79,142,247,0.25);
}
.ai-service-icon {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  display: block;
}
.ai-service-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.ai-service-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---- Contact Section ---- */
.contact-card {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  padding: 4rem 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(200,164,98,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.contact-card .section-title { font-size: clamp(2rem, 4vw, 3rem); }
.contact-card .section-desc { margin: 1rem auto 2rem; }
.contact-email {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 300;
  letter-spacing: 0.02em;
  display: block;
  margin-bottom: 2rem;
  transition: opacity var(--transition);
}
.contact-email:hover { opacity: 0.75; }

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border-light);
  background: var(--bg-surface);
  padding: 3rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.footer-links a {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color var(--transition);
  letter-spacing: 0.04em;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
  font-size: 0.75rem;
  color: var(--text-subtle);
  letter-spacing: 0.04em;
}

/* ---- Cookie Banner ---- */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: min(680px, calc(100vw - 3rem));
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.cookie-banner.hidden { opacity: 0; transform: translateX(-50%) translateY(20px); pointer-events: none; }
.cookie-text { flex: 1; min-width: 200px; font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }
.cookie-text a { color: var(--accent); border-bottom: 1px solid rgba(200,164,98,0.3); }
.cookie-actions { display: flex; gap: 0.75rem; flex-shrink: 0; flex-wrap: wrap; }
.cookie-accept {
  background: var(--accent); color: #080808;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.25rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}
.cookie-accept:hover { background: #d4b474; }
.cookie-decline {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}
.cookie-decline:hover { border-color: var(--text-muted); color: var(--text); }

/* ---- Legal Pages ---- */
.legal-page {
  padding-top: 120px;
  padding-bottom: 6rem;
}
.legal-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.legal-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}
.legal-section { margin-bottom: 2.5rem; }
.legal-section h2 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.legal-section h3 {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  margin: 1rem 0 0.5rem;
}
.legal-section p, .legal-section li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 720px;
}
.legal-section ul { margin: 0.5rem 0 0.5rem 1.5rem; list-style: disc; }
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  transition: color var(--transition);
}
.legal-back:hover { color: var(--accent); }

/* ---- App Detail Page ---- */
.app-hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  position: relative;
  overflow: hidden;
}
.app-hero-content { position: relative; z-index: 2; }
.app-hero-icon {
  width: 100px; height: 100px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 300;
}
.app-hero-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 300;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.app-hero-tagline {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 500px;
}
.screenshots-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 4rem 0;
}
.screenshot-mock {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  aspect-ratio: 9/19;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-subtle);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow: hidden;
  position: relative;
}

/* ---- AI Use-Case Flow Diagrams ---- */
.ai-use-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.ai-use-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}
.ai-use-tab:hover {
  border-color: var(--border);
  color: var(--text);
}
.ai-use-tab.active {
  background: rgba(200,164,98,0.1);
  border-color: var(--accent);
  color: var(--accent);
}
.ai-flow {
  display: flex;
  align-items: stretch;
  margin-bottom: 1.5rem;
}
.ai-flow-step {
  flex: 1;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  transition: border-color var(--transition), background var(--transition);
}
.ai-flow-step:hover {
  border-color: var(--border);
}
.ai-flow-step.input { border-color: rgba(200,164,98,0.3); }
.ai-flow-step.process { border-color: rgba(79,142,247,0.3); }
.ai-flow-step.output { border-color: rgba(76,173,124,0.3); }
.ai-flow-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.input .ai-flow-label { color: var(--accent); }
.process .ai-flow-label { color: var(--accent-2); }
.output .ai-flow-label { color: var(--success); }
.ai-flow-title {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}
.ai-flow-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.ai-flow-icon {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}
.ai-flow-arrow {
  display: flex;
  align-items: center;
  padding: 0 0.6rem;
  flex-shrink: 0;
}
.ai-flow-arrow svg {
  width: 28px;
  height: 28px;
}
@keyframes arrowPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
.ai-flow-arrow svg circle {
  animation: arrowPulse 2s ease-in-out infinite;
}
.ai-flow-examples {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}
.ai-flow-example {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: border-color var(--transition);
}
.ai-flow-example:hover {
  border-color: var(--border);
}
.ai-flow-example strong {
  color: var(--text);
  font-weight: 500;
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.82rem;
}
.ai-flow-panel { display: none; }
.ai-flow-panel.active { display: block; }

/* ---- Scroll Animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ---- Separator ---- */
.sep {
  width: 48px; height: 1px;
  background: var(--accent);
  margin: 1.5rem 0;
  opacity: 0.5;
}
.sep-center { margin: 1.5rem auto; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .apps-grid { grid-template-columns: 1fr 1fr; }
  .ai-inner { grid-template-columns: 1fr; gap: 3rem; }
  .ai-visual { height: 280px; }
  .ai-orb { width: 200px; height: 200px; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav.menu-open .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 2rem;
    gap: 1.5rem;
    align-items: flex-start;
  }
  .nav.menu-open .nav-cta {
    display: flex;
    position: fixed;
    top: calc(70px + 11rem);
    left: 0; right: 0;
    padding: 0 2rem 2rem;
    background: var(--bg);
  }
  .hero-stats { gap: 2rem; }
  .ai-flow { flex-direction: column; }
  .ai-flow-arrow { transform: rotate(90deg); padding: 0.4rem 0; justify-content: center; }
  .ai-flow-examples { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .apps-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .ai-services { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .hero-stats { flex-wrap: wrap; gap: 1.5rem; }
  .contact-card { padding: 2.5rem 1.5rem; }
}
@media (max-width: 600px) {
  .ai-use-tabs { gap: 0.35rem; }
  .ai-use-tab { padding: 0.4rem 0.7rem; font-size: 0.72rem; }
}

/* ---- Divider line ---- */
.divider {
  height: 1px;
  background: var(--border-light);
  margin: 0;
}

/* ---- Highlighted text ---- */
.text-accent { color: var(--accent); }
.text-accent-2 { color: var(--accent-2); }
.italic { font-style: italic; }
