/* Rafaygen marketing pages — shared styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #141210; --bg2: #1B1815; --surface: #221E1A;
  --border: rgba(255,255,255,0.08); --text: #F4F0EA;
  --muted: #B8B1A8; --dim: #8C857C; --accent: #E9E0D4;
  --glass: rgba(34,30,26,0.7);
}
html {
  background: var(--bg); color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body { min-height: 100vh; overflow-x: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(16px, 4vw, 32px);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  background: rgba(20,18,16,0.85);
  border-bottom: 1px solid var(--border);
}
.nav-logo { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 22px; color: var(--accent); letter-spacing: 0.05em; }
.nav-links { display: flex; gap: clamp(16px, 3vw, 28px); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-cta {
  padding: 10px 20px; border-radius: 10px;
  background: var(--accent); color: #141210;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  min-height: 44px; display: inline-flex; align-items: center;
}
.nav-cta:hover { background: #fff; text-decoration: none; }

main { max-width: 860px; margin: 0 auto; padding: clamp(48px, 8vw, 80px) clamp(16px, 4vw, 24px) clamp(80px, 10vw, 120px); }
main.wide { max-width: 980px; }
main.narrow { max-width: 760px; }
.eyebrow { font-family: ui-monospace, monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--dim); margin-bottom: 20px; }
h1 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(34px, 6vw, 58px); font-weight: 500; line-height: 1.1; color: var(--accent); margin-bottom: 24px; }
.lead { font-size: clamp(15px, 2.5vw, 17px); line-height: 1.75; color: var(--muted); margin-bottom: 40px; }
h2 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(24px, 4vw, 28px); font-weight: 500; color: var(--accent); margin: 48px 0 16px; }
p { font-size: 15px; line-height: 1.8; color: var(--muted); margin-bottom: 18px; }
ul, ol { margin: 0 0 20px 20px; }
li { font-size: 15px; line-height: 1.8; color: var(--muted); margin-bottom: 8px; }
strong { color: var(--text); font-weight: 600; }
.divider { border: none; border-top: 1px solid var(--border); margin: 48px 0; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; margin: 28px 0 48px; }
.card {
  padding: 24px; border-radius: 18px;
  background: var(--glass); backdrop-filter: blur(16px);
  border: 1px solid var(--border);
}
.card-label { font-size: 11px; font-family: monospace; text-transform: uppercase; letter-spacing: 0.15em; color: var(--dim); margin-bottom: 8px; }
.card-value { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 24px; color: var(--accent); }
.card-desc { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.6; }

.cta-block { margin-top: 64px; padding: clamp(28px, 5vw, 40px); border-radius: 24px; background: var(--glass); backdrop-filter: blur(20px); border: 1px solid var(--border); text-align: center; }
.cta-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(26px, 4vw, 30px); color: var(--accent); margin-bottom: 12px; }
.cta-sub { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.cta-note { font-size: 11px; color: var(--dim); margin-top: 14px; }
.cta-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 32px; border-radius: 12px; background: var(--accent); color: #141210; font-weight: 600; font-size: 14px; }
.cta-btn:hover { background: #fff; text-decoration: none; }
.cta-btn.secondary { background: transparent; border: 1px solid var(--border); color: var(--accent); margin-left: 12px; }
.cta-btn.secondary:hover { background: var(--surface); }

footer { border-top: 1px solid var(--border); padding: 32px clamp(16px, 4vw, 32px); text-align: center; font-size: 12px; color: var(--dim); }
footer a { color: var(--dim); margin: 0 8px; }

/* ── Guideflow embed — adaptive aspect-ratio + mobile touch hotspots ────── */
.guideflow-section { margin: 48px 0; }
.guideflow-section h2 { margin-top: 0; text-align: center; }
.guideflow-section .lead { text-align: center; max-width: 520px; margin-left: auto; margin-right: auto; }
.guideflow-embed-wrap {
  position: relative; width: 100%; max-width: 920px; margin: 0 auto;
  border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
  touch-action: manipulation;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
/* Aspect-ratio via padding-top trick — 16:10 on desktop, portrait on mobile */
.guideflow-embed-wrap::before {
  content: ""; display: block;
  padding-top: min(62%, 520px);
}
.guideflow-embed-wrap iframe {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; display: block;
  touch-action: manipulation;
  pointer-events: auto;
}
.guideflow-fallback {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 24px; text-align: center; gap: 16px;
}
.guideflow-fallback p { margin-bottom: 0; }

/* ── Contact form ─────────────────────────────────────────────────────────── */
.contact-form label { display: block; font-size: 12px; color: var(--dim); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.1em; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 14px; margin-bottom: 16px;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 15px;
  min-height: 44px; outline: none;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: rgba(255,255,255,0.22); }
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form button {
  min-height: 44px; padding: 12px 28px; border-radius: 12px;
  background: var(--accent); color: #141210; font-weight: 600;
  border: none; cursor: pointer; font-size: 14px;
}
.contact-form button:hover { background: #fff; }

/* ── AI Features page ─────────────────────────────────────────────────────── */
.page-header { max-width: 860px; margin: 0 auto; padding: clamp(60px, 8vw, 80px) clamp(16px, 4vw, 24px) clamp(40px, 6vw, 60px); text-align: center; }
.page-header h1 { margin-bottom: 16px; }
.page-header .lead { max-width: 580px; margin-left: auto; margin-right: auto; }

.features { max-width: 900px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 24px) 80px; display: flex; flex-direction: column; gap: 24px; }
.feature {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border); border-radius: 24px; overflow: hidden;
  background: var(--glass); backdrop-filter: blur(16px);
}
.feature:nth-child(even) .feature-text { order: 2; }
.feature:nth-child(even) .feature-demo { order: 1; }
.feature-text { padding: clamp(28px, 5vw, 48px) clamp(24px, 4vw, 40px); display: flex; flex-direction: column; justify-content: center; }
.feature-num { font-family: monospace; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 16px; }
.feature-text h2 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(24px, 3.5vw, 30px); font-weight: 500; color: var(--accent); margin: 0 0 14px; line-height: 1.2; }
.feature-text p { font-size: 14px; line-height: 1.75; color: var(--muted); margin-bottom: 12px; }
.feature-text ul { margin-left: 18px; }
.feature-text li { font-size: 13px; line-height: 1.7; color: var(--muted); margin-bottom: 6px; }
.feature-demo {
  background: var(--surface); border-left: 1px solid var(--border);
  padding: clamp(24px, 4vw, 36px) clamp(20px, 3vw, 32px);
  display: flex; align-items: center; justify-content: center;
  min-height: 260px;
}
.feature:nth-child(even) .feature-demo { border-left: none; border-right: 1px solid var(--border); }

/* Demo chat bubbles */
.demo-chat { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 10px; }
.bubble { padding: 12px 16px; border-radius: 16px; font-size: 13px; line-height: 1.6; max-width: 90%; }
.bubble-user { background: var(--glass); border: 1px solid var(--border); color: var(--text); align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble-ai { background: rgba(233,224,212,0.06); border: 1px solid var(--border); color: var(--muted); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble-thinking { background: rgba(233,224,212,0.04); border: 1px dashed rgba(233,224,212,0.15); color: var(--dim); font-size: 11px; font-family: monospace; align-self: flex-start; border-radius: 12px; padding: 10px 14px; }
.source-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 20px; background: rgba(233,224,212,0.06); border: 1px solid var(--border); font-size: 11px; color: var(--muted); font-family: monospace; margin-top: 8px; }

/* Demo code block */
.demo-code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; line-height: 1.65; color: var(--muted); background: rgba(0,0,0,0.3); border-radius: 14px; padding: 20px; width: 100%; border: 1px solid var(--border); overflow-x: auto; }
.code-kw { color: #C792EA; }
.code-fn { color: #82AAFF; }
.code-str { color: #C3E88D; }
.code-cm { color: var(--dim); }

/* Language grid */
.lang-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; width: 100%; max-width: 300px; }
.lang-item { padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,0.3); border: 1px solid var(--border); min-height: 44px; }
.lang-name { font-size: 13px; color: var(--text); font-weight: 500; }
.lang-script { font-size: 12px; color: var(--dim); margin-top: 2px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .feature { grid-template-columns: 1fr; }
  .feature-demo {
    min-height: 200px;
    border-left: none !important;
    border-right: none !important;
    border-top: 1px solid var(--border);
  }
  .feature:nth-child(even) .feature-text { order: 1; }
  .feature:nth-child(even) .feature-demo { order: 2; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .cta-btn.secondary { margin-left: 0; margin-top: 12px; display: flex; width: 100%; }
  .guideflow-embed-wrap::before { padding-top: min(130%, 600px); }
}
