/* VibeStack Website - base styles. Bold, modern, dark tech-startup look. Mobile first. */

:root {
    --bg: #0a0a14;
    --bg-raised: #14142a;
    --bg-tile: #1b1b38;
    --border: #2a2a4d;
    --text: #f2f2fa;
    --text-muted: #a3a3c2;
    --accent: #7c5cff;
    --accent-2: #19d3da;
    --danger: #ff5d73;
    --success: #3ddc97;
    --radius: 14px;
    --gradient: linear-gradient(135deg, var(--accent), var(--accent-2));
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.6;
}

a { color: var(--accent-2); }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 7vw, 4.5rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 750; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 680px; }
.muted { color: var(--text-muted); }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.2rem; }
.logo:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.lang-switch { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.lang-switch a { padding: 0.3rem 0.75rem; color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.lang-switch a:hover { color: #fff; }
.lang-switch a[aria-current="true"] { background: var(--bg-tile); color: #fff; }

/* Layout */
.site-main { flex: 1; }
.page { padding: 3rem 0; }
.hero { padding: 5rem 0 6rem; background: radial-gradient(ellipse at 20% 0%, rgba(124, 92, 255, 0.28), transparent 60%), radial-gradient(ellipse at 90% 30%, rgba(25, 211, 218, 0.16), transparent 55%); }
.hero h1 { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.85rem; font-weight: 700; color: var(--accent-2); margin-bottom: 1rem; }
.lead { font-size: clamp(1.15rem, 2.5vw, 1.5rem); max-width: 40ch; color: var(--text); }

.section { padding: 4rem 0; }
.section-alt { background: var(--bg-raised); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 1.5rem 0; color: var(--text-muted); font-size: 0.95rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.1s ease, opacity 0.1s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gradient); color: #0a0a14; }
.btn-primary:hover { color: #0a0a14; opacity: 0.92; }
.btn-secondary { background: transparent; border-color: var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--accent-2); color: #fff; }
.btn-danger { background: var(--danger); color: #0a0a14; }

/* Cards */
.card { background: var(--bg-tile); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.card-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }

/* Forms */
.form { display: grid; gap: 1rem; max-width: 560px; }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 600; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field select, .field textarea {
    width: 100%; padding: 0.7rem 0.85rem; border-radius: 10px; border: 1px solid var(--border);
    background: var(--bg); color: var(--text); font: inherit;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent-2); outline: none; }
.field-check { display: flex; gap: 0.6rem; align-items: flex-start; }
.field-check input { margin-top: 0.35rem; }
.field-error { color: var(--danger); font-size: 0.9rem; }

/* Messages */
.alert { padding: 0.9rem 1.1rem; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 1.25rem; }
.alert-info { background: rgba(25, 211, 218, 0.08); border-color: rgba(25, 211, 218, 0.4); }
.alert-success { background: rgba(61, 220, 151, 0.1); border-color: rgba(61, 220, 151, 0.5); }
.alert-error { background: rgba(255, 93, 115, 0.1); border-color: rgba(255, 93, 115, 0.5); }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* Tablet and desktop */
@media (min-width: 640px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .card-grid { grid-template-columns: repeat(3, 1fr); }
    .page { padding: 4.5rem 0; }
}

@media (max-width: 420px) {
    .logo-text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* Language switch separator, header buttons */
.lang-switch { align-items: center; padding: 0 0.25rem; }
.lang-sep { color: var(--border); }
.inline-form { display: inline; margin: 0; }
.header-actions .btn { padding: 0.4rem 0.9rem; }
.btn-large { padding: 0.8rem 1.6rem; font-size: 1.05rem; }
.btn-small { padding: 0.3rem 0.8rem; font-size: 0.85rem; }
.button-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Landing page */
.hero h1 { overflow-wrap: anywhere; }
.product-headline { color: var(--accent-2); font-size: 1.4rem; }
.product-text, .product-note { max-width: 60ch; }
.product-note { font-weight: 600; }
.badge { display: inline-block; padding: 0.1rem 0.6rem; border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 700; vertical-align: middle; }
.badge-soft { background: transparent; border: 1px solid var(--accent-2); color: var(--accent-2); margin-left: 0.5rem; }
.input-short { max-width: 8rem; }
.prose h2 { margin-top: 2rem; font-size: 1.5rem; }
.prose ul { padding-left: 1.25rem; }
.field-check label { font-weight: 400; }

/* Admin area */
.admin-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.admin-nav a { padding: 0.35rem 0.8rem; border-radius: 999px; color: var(--text-muted); text-decoration: none; font-weight: 600; }
.admin-nav a:hover, .admin-nav a[aria-current="page"] { background: var(--bg-tile); color: #fff; }
.admin-user { color: var(--text-muted); font-size: 0.95rem; }
.admin .header-inner { flex-wrap: wrap; padding-top: 0.5rem; padding-bottom: 0.5rem; }
.admin h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.admin h2 { font-size: 1.5rem; margin-top: 2rem; }
.invite-link { overflow-wrap: anywhere; }
.text-row { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 1rem; display: grid; gap: 0.75rem; min-width: 0; }
.text-row legend { font-weight: 700; padding: 0 0.4rem; }
.text-row .muted { font-weight: 400; font-size: 0.8rem; }
.texts-form .field input, .texts-form .field textarea { max-width: 100%; }
.save-bar { position: sticky; bottom: 0; padding: 1rem 0; background: linear-gradient(transparent, var(--bg) 40%); }
.filter-form { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filter-form select { padding: 0.5rem 0.7rem; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; }
.counts { display: flex; gap: 1.5rem; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.message-text { min-width: 14rem; overflow-wrap: anywhere; }
.table td { overflow-wrap: anywhere; }
