/* TrokAI shared styles: tokens, layout, header, footer, buttons, cards, forms, legal pages. */

:root {
  color-scheme: dark;
  --bg: #0b0b12;
  --bg-2: #101019;
  --panel: #14141f;
  --sunken: #07070c;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.14);
  --text: #f3f3f7;
  --text-2: #a9a9b8;
  --text-3: #80808f;
  --red: #ff3b55;
  --red-2: #e62e47;
  --red-text: #ff8595;
  --red-soft: rgba(255, 59, 85, 0.12);
  --red-line: rgba(255, 59, 85, 0.38);
  --green: #34d399;
  --amber: #f5b544;
  --teal: #5eead4;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 50% -8%, rgba(255, 59, 85, 0.13), transparent 70%),
    radial-gradient(45% 40% at 100% 100%, rgba(102, 126, 234, 0.06), transparent 70%);
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { text-wrap: balance; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.wrap.narrow { width: min(760px, calc(100% - 40px)); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 11, 18, 0.72);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; flex: none; border-radius: 6px; }
.brand img { height: 24px; width: auto; }
.nav { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 500; }
.nav a:not(.btn) { color: var(--text-2); text-decoration: none; transition: color 0.2s; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px;
  border: 1px solid transparent; border-radius: 999px;
  font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s, border-color 0.2s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--red-2));
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 59, 85, 0.28);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(255, 59, 85, 0.36); }
.btn-ghost { background: var(--surface); border-color: var(--border-2); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Home ---------- */
.hero {
  display: grid; grid-template-columns: 1.2fr 0.8fr; align-items: center; gap: 56px;
  padding: 88px 0 72px;
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px;
  border: 1px solid var(--border-2); border-radius: 999px;
  background: var(--surface);
  color: var(--text-2); font-size: 13px; font-weight: 500;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18); }
.hero h1 {
  margin: 20px 0 18px;
  font-size: clamp(34px, 5vw, 54px); font-weight: 800; line-height: 1.06; letter-spacing: -0.035em;
}
.hero h1 span { display: block; text-wrap: balance; }
.hero h1 .muted { color: var(--text-3); }
.lead { max-width: 520px; margin: 0 0 30px; color: var(--text-2); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin: 18px 0 0; color: var(--text-3); font-size: 14px; }

.demo {
  padding: 18px;
  border: 1px solid var(--border-2); border-radius: 24px;
  background: linear-gradient(180deg, #16161f, #101018);
  box-shadow: var(--shadow);
}
.demo-top { display: flex; gap: 6px; margin-bottom: 20px; }
.demo-top span { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); }
.demo-user {
  width: fit-content; max-width: 82%; margin-left: auto;
  padding: 10px 15px;
  border-radius: 18px 18px 6px 18px;
  background: linear-gradient(135deg, var(--red), var(--red-2));
  color: #fff; font-size: 14.5px;
}
.demo-ai { margin: 16px 4px 0; font-size: 14.5px; line-height: 1.65; }
.demo-ai p { margin: 0 0 10px; }
.demo-ai p:last-child { margin: 0; color: var(--text-2); }
.demo-input {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 20px; padding: 7px 7px 7px 16px;
  border: 1px solid var(--border-2); border-radius: 999px;
  color: var(--text-3); font-size: 14px;
}
.demo-send { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--red); color: #fff; }
.demo-send svg { width: 16px; height: 16px; }

.section { padding: 64px 0; }
.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-head h2 { margin: 0 0 12px; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; letter-spacing: -0.025em; }
.section-head p { margin: 0; color: var(--text-2); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.card .icon {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px;
  border-radius: 12px; background: var(--red-soft); color: var(--red);
}
.card .icon svg { width: 22px; height: 22px; }
.card h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--text-2); font-size: 15px; }

.card-link { color: var(--red-text); font-weight: 600; text-decoration: none; white-space: nowrap; }
.card-link::after { content: " \2192"; }
.card-link:hover { text-decoration: underline; }

.prompts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.prompt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 20px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.prompt:hover { background: var(--surface-2); border-color: var(--border-2); transform: translateY(-2px); }
.prompt-tag { padding: 3px 10px; border-radius: 999px; background: var(--red-soft); color: var(--red-text); font-size: 12px; font-weight: 600; }
.prompt-text { font-size: 15.5px; line-height: 1.5; }
.prompt-text::after { content: " \2192"; color: var(--text-3); transition: color 0.2s; }
.prompt:hover .prompt-text::after { color: var(--red-text); }

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; gap: 18px; }
.plan { display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.plan h3 { margin: 0 0 4px; font-size: 18px; }
.plan-price { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
.plan-price span { color: var(--text-3); font-size: 15px; font-weight: 500; letter-spacing: 0; }
.plan .checklist { flex: 1; align-content: start; margin: 22px 0 26px; }
.plan-pro {
  border-color: var(--red-line);
  background: radial-gradient(120% 80% at 50% 0%, rgba(255, 59, 85, 0.13), transparent 65%), var(--surface);
}

.faq { display: grid; gap: 10px; max-width: 760px; margin: 0 auto; }
.faq a { color: var(--red-text); text-decoration: none; }
.faq a:hover { text-decoration: underline; }
.faq details { padding: 0 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0; font-weight: 600; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-3); font-size: 22px; font-weight: 400; line-height: 1; transition: transform 0.2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--text-2); }

.cta {
  padding: 56px 24px; text-align: center;
  border: 1px solid var(--border); border-radius: 28px;
  background: radial-gradient(80% 120% at 50% 0%, rgba(255, 59, 85, 0.16), transparent 70%), var(--bg-2);
}
.cta h2 { margin: 0 0 10px; font-size: clamp(26px, 3.2vw, 36px); letter-spacing: -0.02em; }
.cta p { margin: 0 0 26px; color: var(--text-2); }

/* ---------- Content pages ---------- */
.page { padding: 64px 0 8px; }
.page-head { margin-bottom: 36px; }
.page-head h1 { margin: 0 0 10px; font-size: clamp(34px, 4.5vw, 48px); line-height: 1.1; letter-spacing: -0.03em; }
.page-head p { margin: 0; color: var(--text-2); }
.stack { display: grid; gap: 16px; }
.panel { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.panel h2 { margin: 0 0 10px; font-size: 20px; letter-spacing: -0.01em; }
.panel p { margin: 0 0 12px; color: var(--text-2); }
.panel p:last-child { margin-bottom: 0; }
.panel.accent { border-color: var(--red-line); background: var(--red-soft); }
.panel-icon {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px;
  border-radius: 11px; background: var(--red-soft); color: var(--red);
}
.panel-icon svg { width: 20px; height: 20px; }
.panel.accent .panel-icon { background: rgba(255, 255, 255, 0.08); }
.plain-list { margin: 0 0 12px; padding-left: 20px; color: var(--text-2); }
.plain-list li { margin-bottom: 4px; }
.panel a, .prose a, .fine a, .note a { color: var(--red-text); text-decoration: none; }
.panel a:hover, .prose a:hover, .fine a:hover, .note a:hover { text-decoration: underline; }
.highlight { color: var(--text); font-weight: 600; }

.prose { color: var(--text-2); line-height: 1.75; }
.prose h2 { margin: 40px 0 10px; color: var(--text); font-size: 20px; letter-spacing: -0.01em; }
.prose p, .prose ul { margin: 0 0 14px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--text); }
.updated { margin: 0 0 32px; color: var(--text-3); font-size: 14px; }

/* ---------- Forms, pricing ---------- */
.form-card, .pricing {
  padding: 36px;
  border: 1px solid var(--border-2); border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.center-page { display: grid; place-items: center; padding: 64px 0 8px; }
.center-page > * { width: min(440px, 100%); }
.form-card h1, .pricing h1 { margin: 0 0 8px; font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; }
.form-card > p { margin: 0 0 24px; color: var(--text-2); }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field label { color: var(--text-2); font-size: 13px; font-weight: 600; }
.input {
  width: 100%; height: 52px; padding: 0 16px;
  border: 1px solid var(--border-2); border-radius: 14px;
  background: var(--sunken);
  font-family: var(--mono); font-size: 17px; letter-spacing: 0.08em; text-align: center; text-transform: uppercase;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder { color: var(--text-3); letter-spacing: 0.02em; text-transform: none; }
.input:focus { outline: none; border-color: var(--red-line); box-shadow: 0 0 0 4px var(--red-soft); }
.form-msg { min-height: 22px; margin: 12px 0 0; font-size: 14px; text-align: center; }
.form-msg:empty { min-height: 0; margin: 0; }
.form-msg.error { color: #ff7b8b; }
.form-msg.ok { color: var(--green); }
.note {
  margin-top: 24px; padding: 16px 18px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-2); font-size: 14px; line-height: 1.6;
}
.note strong { display: block; margin-bottom: 4px; color: var(--text); }
.fine { margin: 14px 0 0; color: var(--text-3); font-size: 13px; text-align: center; }

.pricing { text-align: center; }
.pricing .pill { margin-bottom: 18px; }
.pricing > p { margin: 0 0 20px; color: var(--text-2); }
.price { font-size: 52px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.price span { color: var(--text-3); font-size: 17px; font-weight: 500; letter-spacing: 0; }
.checklist { display: grid; gap: 12px; margin: 26px 0 28px; padding: 0; list-style: none; text-align: left; }
.checklist li { display: flex; align-items: flex-start; gap: 12px; }
.checklist li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%;
  background: var(--red-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff3b55' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.checklist small { color: var(--text-3); }

.table-card { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.compare { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 14px 18px; border-bottom: 1px solid var(--border); text-align: left; }
.compare thead th { color: var(--text); font-size: 14px; }
.compare tbody th { color: var(--text-2); font-weight: 500; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare td { color: var(--text-2); }
.compare td.yes { color: var(--text); font-weight: 600; }
.compare td.no { color: var(--text-3); }
.compare th:last-child, .compare td:last-child { background: rgba(255, 59, 85, 0.05); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 72px; padding: 32px 0 40px; border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 14px; color: var(--text-3); font-size: 14px; }
.footer-brand img { height: 20px; width: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.footer-links a { color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 44px; padding: 56px 0 48px; }
  .cards { grid-template-columns: 1fr; }
  .prompts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .prompts, .plans { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap, .wrap.narrow { width: calc(100% - 32px); }
  .nav { gap: 18px; }
  .nav .hide-sm { display: none; }
  .brand img { height: 22px; }
  .hero-actions .btn { flex: 1; }
  .form-card, .pricing { padding: 28px 20px; }
  .panel { padding: 22px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
