/* ===== VARIABLES ===== */
:root {
  --bg: #FFFFFF;
  --bg-subtle: #F8FAFC;
  --bg-card: #FFFFFF;
  --border: #E2E8F0;
  --border-dark: #CBD5E1;
  --text: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --accent: #6366F1;
  --accent-hover: #4F46E5;
  --accent-bg: #F0F0FF;
  --radius: 14px;
  --radius-lg: 20px;
  --nav-h: 64px;
  --max: 1080px;
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ===== LAYOUT ===== */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

section { padding: 96px 0; }

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

nav.scrolled { border-color: var(--border); }

.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: 8px;
  transition: all 0.15s;
}

.nav-links a:hover { color: var(--text); background: var(--bg-subtle); }

.nav-links .nav-active { color: var(--text); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s;
}

.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 20px;
  z-index: 99;
}

.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; }
.mobile-menu a {
  display: block;
  padding: 10px 12px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  font-size: 0.92rem;
}
.mobile-menu a:hover { color: var(--text); background: var(--bg-subtle); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--text);
  color: #fff;
}

.btn-primary:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-dark);
}

.btn-outline:hover {
  background: var(--bg-subtle);
  border-color: var(--text-light);
  transform: translateY(-1px);
}

.btn-appstore {
  background: var(--text);
  color: #fff;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 0.95rem;
  gap: 10px;
}

.btn-appstore:hover {
  background: #1e293b;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* ===== DIVIDER ===== */
.divider {
  border: none;
  border-top: 1px solid var(--border);
}

/* ===== SECTION LABEL ===== */
.section-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-family: 'SF Mono', 'Fira Mono', monospace;
  color: var(--text-light);
  margin-bottom: 12px;
}

/* ===== INDEX: HERO ===== */
.hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 96px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-inner > div:first-child { will-change: transform; }
.code-editor { will-change: transform; }

.hero h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
  white-space: nowrap;
}

#rotating-word {
  display: inline-block;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 440px;
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* App preview card in hero */
.hero-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-app-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.hero-app-row:last-child { border-bottom: none; padding-bottom: 0; }

.app-icon-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-icon-placeholder.quotely {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.app-icon-placeholder.coming-soon {
  background: var(--bg-subtle);
  border: 2px dashed var(--border-dark);
}

.app-icon-placeholder svg {
  width: 24px; height: 24px;
  stroke: #fff; fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-icon-placeholder.coming-soon svg { stroke: var(--text-light); }

.app-row-info { flex: 1; }
.app-row-name { font-size: 0.95rem; font-weight: 600; margin-bottom: 2px; }
.app-row-sub { font-size: 0.8rem; color: var(--text-muted); }

.app-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

.badge-live {
  background: #D1FAE5;
  color: #065F46;
}

.badge-soon {
  background: var(--bg-subtle);
  color: var(--text-light);
  border: 1px solid var(--border);
}

/* ===== INDEX: APPS ===== */
.apps { background: var(--bg-subtle); }

.apps-header { margin-bottom: 48px; }

.apps-header h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.apps-header p { color: var(--text-muted); font-size: 1rem; }

.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s;
}

.app-card:hover {
  border-color: var(--border-dark);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.07);
}

.app-card-thumb {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.app-card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.thumb-quotely {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.thumb-soon {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.thumb-thoth {
  background: linear-gradient(135deg, #2e1065 0%, #7c3aed 100%);
}

.app-card-thumb-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
}

.app-card-thumb-icon svg {
  width: 32px; height: 32px;
  stroke: #fff; fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.thumb-soon .app-card-thumb-icon {
  background: var(--bg-card);
  border: 2px dashed var(--border-dark);
}

.thumb-soon .app-card-thumb-icon svg { stroke: var(--text-light); }

.app-card-body { padding: 28px; }
.app-card-cat {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 8px;
}
.app-card-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.app-card-body p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

/* ===== INDEX: ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-text h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.about-text p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 12px;
  font-size: 0.97rem;
}

.about-text p:last-of-type { margin-bottom: 32px; }

.about-aside {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.about-stat { }

.about-stat-val {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-family: 'SF Mono', 'Fira Mono', monospace;
  color: var(--text);
  margin-bottom: 4px;
}

.about-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.about-stat + .about-stat {
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.footer-logo span { color: var(--accent); }

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-light);
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--text-muted); }

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-light);
}

/* ===== QUOTELY PAGE ===== */
.quotely-hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 80px;
  text-align: center;
}

.quotely-icon {
  width: 100px;
  height: 100px;
  border-radius: 26px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  box-shadow: 0 16px 48px rgba(118, 75, 162, 0.25);
}

.quotely-icon svg {
  width: 44px; height: 44px;
  stroke: #fff; fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quotely-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}

.quotely-hero .tagline {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.quotely-ratings {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}

.stars { color: #F59E0B; font-size: 1.1rem; letter-spacing: 2px; }
.rating-text { font-size: 0.85rem; color: var(--text-muted); }

.quotely-features {
  background: var(--bg-subtle);
  padding: 80px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 48px;
}

.feature-item {
  background: var(--bg);
  padding: 40px 32px;
}

.feature-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 20px; height: 20px;
  stroke: var(--accent); fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.feature-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.quotely-screenshots {
  padding: 80px 0;
  text-align: center;
}

.screenshots-placeholder {
  margin-top: 48px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.screenshot-mock {
  width: 160px;
  height: 300px;
  border-radius: 24px;
  background: linear-gradient(160deg, #667eea20, #764ba215);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.screenshot-mock.center-mock {
  width: 180px;
  height: 340px;
  background: linear-gradient(160deg, #667eea30, #764ba225);
  border-color: #764ba230;
}

.quotely-cta {
  padding: 80px 0;
  text-align: center;
  background: var(--bg-subtle);
}

.quotely-cta h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.quotely-cta p {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 1rem;
}

/* ===== CODE EDITOR (HERO) ===== */
.code-editor {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
}

.code-editor-header {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.code-editor-dots { display: flex; gap: 6px; }

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-red    { background: #FF5F57; }
.dot-yellow { background: #FEBC2E; }
.dot-green  { background: #28C840; }

.code-editor-filename {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Fira Mono', monospace;
}

.code-block {
  background: #FAFBFC;
  padding: 24px;
  margin: 0;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.85;
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
  white-space: pre;
  min-height: 240px;
}

.code-block code { display: block; }

.kw      { color: var(--accent); font-weight: 600; }
.type    { color: #7C3AED; }
.str     { color: #059669; }
.fn      { color: #0EA5E9; }
.comment { color: var(--text-light); font-style: italic; }

.code-cursor {
  display: inline-block;
  width: 2px;
  height: 0.9em;
  background: var(--accent);
  margin-left: 1px;
  vertical-align: text-bottom;
}

.code-cursor.blink { animation: cursor-blink 1s step-end infinite; }

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ===== ANIMATE ===== */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  section { padding: 64px 0; }
  .container { padding: 0 20px; }

  .nav-links { display: none; }
  .hamburger { display: flex; }

  .hero { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 64px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 2.2rem; }
  .hero p { max-width: 100%; }

  .apps-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }

  .features-grid { grid-template-columns: 1fr; }
  .screenshots-placeholder { flex-direction: column; padding: 40px 24px; }
  .screenshot-mock { width: 140px; height: 260px; }
  .screenshot-mock.center-mock { width: 160px; height: 300px; }

  .footer-inner { flex-direction: column; gap: 20px; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}
