:root {
    --bg: #fdf5ff;
    --bg-alt: #ffffff;
    --accent: #f97316;
    --accent-strong: #c2410c;
    --accent-soft: rgba(249,115,22,0.12);
    --border: #e5e7eb;
    --border-strong: #cbd5f5;
    --text-main: #111827;
    --text-muted: #6b7280;
    --danger: #dc2626;
    --danger-soft: #fee2e2;
    --shadow-card: 0 18px 40px rgba(15,23,42,0.12);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-pill: 999px;
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-sans);
    background: radial-gradient(circle at top left, #fef3c7, #fdf5ff 52%, #f9fafb 100%);
    color: var(--text-main);
}

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

.page-wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: 18px 16px 40px;
}

/* HEADER */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    background: conic-gradient(from 180deg, #f97316, #ec4899, #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 10px 25px rgba(248, 113, 22, 0.45);
}

.brand-title {
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: 13px;
}

.brand-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.nav {
    display: flex;
    gap: 14px;
    font-size: 13px;
    color: var(--text-muted);
}

.nav-link {
    position: relative;
    cursor: pointer;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f97316, #ec4899);
    opacity: 0;
    transform: scaleX(0.5);
    transform-origin: center;
    transition: opacity .15s, transform .15s;
}

.nav-link:hover::after {
    opacity: 1;
    transform: scaleX(1);
}

.header-cta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-small-outline {
    border-radius: var(--radius-pill);
    border: 1px solid rgba(249,115,22,.5);
    background: rgba(255,255,255,.9);
    font-size: 13px;
    padding: 6px 14px;
    cursor: pointer;
    color: var(--accent-strong);
    font-weight: 500;
}

@media (max-width: 768px) {
    .nav { display: none; }
}

/* HERO (index) */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .95fr);
    gap: 26px;
    align-items: center;
}

@media (max-width: 860px) {
    .hero { grid-template-columns: minmax(0, 1fr); }
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px 4px 4px;
    border-radius: var(--radius-pill);
    border: 1px dashed rgba(248,113,22,.55);
    background: rgba(255,255,255,.9);
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.hero-tag-main {
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: linear-gradient(120deg, #f97316, #ec4899);
    color: #fff;
    font-weight: 600;
}

.hero-title {
    font-size: clamp(26px, 4vw, 32px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}

.hero-sub {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 460px;
    margin-bottom: 16px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.hero-pill {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(209,213,219,.9);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.btn-primary {
    border-radius: var(--radius-pill);
    border: none;
    background: linear-gradient(120deg, #f97316, #ec4899);
    color: #fff;
    font-size: 14px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 18px 40px rgba(249,115,22,0.4);
}

.btn-secondary {
    border-radius: var(--radius-pill);
    border: 1px solid rgba(209,213,219,.9);
    background: rgba(255,255,255,.92);
    font-size: 13px;
    padding: 9px 16px;
    cursor: pointer;
    color: var(--text-main);
}

.hero-note {
    font-size: 11px;
    color: var(--text-muted);
    max-width: 420px;
}

/* HERO image */

.hero-illustration {
    background: #fff;
    border-radius: 28px;
    padding: 12px;
    border: 1px solid rgba(209,213,219,.85);
    box-shadow: var(--shadow-card);
}

.hero-illustration img {
    width: 100%;
    display: block;
    border-radius: 20px;
}

/* SECTIONS */

section {
    margin-top: 38px;
}

.section-head {
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.section-sub {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 540px;
}

/* GRID / CARDS */

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 860px) {
    .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 600px) {
    .grid-3 { grid-template-columns: minmax(0,1fr); }
}

.card {
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 14px 14px 12px;
    box-shadow: 0 12px 24px rgba(15,23,42,0.06);
    font-size: 13px;
}

.card h3 {
    margin: 0 0 6px;
    font-size: 14px;
}

.card p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 6px;
}

.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* LIMITS */

.limits-box {
    background: #fff;
    border-radius: 24px;
    border: 1px solid var(--border);
    padding: 18px 16px 14px;
    box-shadow: 0 16px 30px rgba(15,23,42,0.08);
    max-width: 520px;
    font-size: 13px;
}

.limits-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.limits-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.limits-list {
    font-size: 12px;
    padding-left: 18px;
    margin: 0;
}

.limits-list li {
    margin-bottom: 4px;
}

/* FAQ */

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 800px) {
    .faq-grid { grid-template-columns: minmax(0,1fr); }
}

.faq-item {
    background: var(--bg-alt);
    border-radius: 18px;
    border: 1px solid var(--border);
    padding: 12px 14px 10px;
    font-size: 13px;
    box-shadow: 0 12px 22px rgba(15,23,42,0.06);
}

.faq-q {
    font-weight: 600;
    margin-bottom: 4px;
}

.faq-a {
    font-size: 12px;
    color: var(--text-muted);
}

/* CODE BLOCK (for API example on index) */

.code-block {
    background: #020617;
    color: #e5e7eb;
    border-radius: 14px;
    padding: 10px 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    border: 1px solid #0f172a;
    box-shadow: 0 16px 30px rgba(15,23,42,0.4);
    overflow-x: auto;
}

.code-comment { color: #9ca3af; }
.code-url { color: #fb923c; }
.code-param { color: #22c55e; }
.code-key { color: #38bdf8; }

/* AUTH PAGES */

.auth-layout {
    max-width: 420px;
    margin: 32px auto 0;
}

.auth-card {
    background: var(--bg-alt);
    border-radius: 22px;
    border: 1px solid var(--border);
    padding: 20px 18px 16px;
    box-shadow: var(--shadow-card);
    font-size: 13px;
}

.auth-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.auth-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.auth-illustration {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 12px;
}

.auth-illustration img {
    width: 100%;
    display: block;
}

.form-group {
    margin-bottom: 10px;
}

.form-label {
    display: block;
    font-size: 12px;
    margin-bottom: 3px;
}

.form-input {
    width: 100%;
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(249,115,22,.35);
}

.form-row-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.checkbox-label {
    font-size: 12px;
    color: var(--text-muted);
}

.checkbox-label input {
    margin-right: 6px;
}

.form-actions {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.btn-auth {
    width: 100%;
    border-radius: var(--radius-pill);
    border: none;
    background: linear-gradient(120deg, #f97316, #ec4899);
    color: #fff;
    font-size: 14px;
    padding: 9px 16px;
    font-weight: 600;
    cursor: pointer;
}

.btn-auth-secondary {
    width: 100%;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: #f9fafb;
    color: var(--text-main);
    font-size: 13px;
    padding: 8px 14px;
    cursor: pointer;
}

.auth-meta {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.auth-meta a {
    text-decoration: underline;
}

/* ALERT */

.alert-error {
    background: var(--danger-soft);
    border: 1px solid var(--danger);
    color: var(--danger);
    border-radius: 12px;
    padding: 8px 10px;
    font-size: 12px;
    margin-bottom: 10px;
}

/* TERMS PAGE */

.terms {
    max-width: 720px;
    margin: 30px auto 0;
    background: var(--bg-alt);
    border-radius: 22px;
    border: 1px solid var(--border);
    padding: 20px 18px 18px;
    box-shadow: var(--shadow-card);
    font-size: 14px;
}

.terms h1 {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 8px;
}

.terms h2 {
    font-size: 16px;
    margin-top: 16px;
    margin-bottom: 6px;
}

.terms p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    margin-bottom: 4px;
}

.terms ul {
    font-size: 13px;
    color: var(--text-muted);
    padding-left: 18px;
}

/* FOOTER */

footer {
    margin-top: 36px;
    padding-top: 14px;
    border-top: 1px solid rgba(209,213,219,.8);
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-link {
    text-decoration: underline dotted;
    cursor: default;
}
