/* ================================================================
   Delimetrics — Design System
   ================================================================ */

:root {
    /* Backgrounds */
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d24;
    --bg-tertiary: #22262d;
    --bg-card: #2a2e36;
    --bg-hover: #32373f;
    --bg-input: #2a2e36;

    /* Text */
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --text-muted: #718096;

    /* Accent */
    --accent: #48bb78;
    --accent-light: #68d391;
    --accent-dim: rgba(72, 187, 120, 0.15);
    --accent-blue: #63b3ed;
    --accent-orange: #ed8936;
    --accent-red: #fc8181;

    /* Borders & Shadows */
    --border: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.12);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    /* Transitions */
    --transition: 200ms ease;
}

/* ================================================================
   Reset & Base
   ================================================================ */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-light);
}

h1, h2, h3 {
    margin-top: 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

h1 sup {
    font-size: 0.8rem;
    margin-left: 0.75rem;
    font-weight: 400;
}

h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ================================================================
   Layout
   ================================================================ */

main {
    padding-top: 72px;
}

section {
    max-width: 900px;
    margin: 0 auto 2rem;
    padding: 0 1.25rem;
}

/* ================================================================
   Header
   ================================================================ */

.header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    background: rgba(15, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.header a {
    float: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    line-height: 1;
    text-decoration: none;
}

.header a:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.header a.logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.03em;
    padding-left: 0;
    text-shadow: none;
}

.header a.logo:hover {
    color: var(--accent-light);
    background: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (min-width: 640px) {
    .header a.logo {
        font-size: 1.25rem;
    }
}

/* ================================================================
   Buttons
   ================================================================ */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--bg-primary);
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: none;
}

.button:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.button:active {
    transform: translateY(0);
}

.button:disabled {
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.button-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.button-secondary:hover {
    background: var(--bg-hover);
}

/* ================================================================
   Forms & Inputs
   ================================================================ */

.label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
    display: block;
}

.input-text {
    width: 100%;
    height: 3rem;
    padding: 0 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.input-text:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.input-text::placeholder {
    color: var(--text-muted);
}

input[type="file"] {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

input[type="checkbox"] {
    accent-color: var(--accent);
}

/* ================================================================
   Flash Messages
   ================================================================ */

.flash-outer {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    justify-content: center;
    padding: 0 1rem;
}

.flash-inner {
    width: 100%;
    max-width: 600px;
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-lg);
}

.flash-success {
    background: rgba(72, 187, 120, 0.15);
    color: var(--accent-light);
    border: 1px solid rgba(72, 187, 120, 0.3);
}

.flash-error {
    background: rgba(252, 129, 129, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(252, 129, 129, 0.3);
}

.flash-button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0.7;
    padding: 4px 8px;
}

.flash-button:hover {
    opacity: 1;
}

/* ================================================================
   Cards & Containers
   ================================================================ */

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.gray-background-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem 2rem;
}

.gray-background {
    background: var(--bg-secondary);
}

.registerForm {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    opacity: 1;
}

/* ================================================================
   Flex Layout
   ================================================================ */

.flex-box-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
}

.flex-box {
    flex: 1;
    min-width: 220px;
}

.flex-box-container-2-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    width: 100%;
    margin-top: 2rem;
}

.flex-box-container-2-columns > .flex-box {
    flex: 1;
    min-width: 280px;
}

/* ================================================================
   KPI Boxes
   ================================================================ */

.kpi-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
}

.kpi-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.kpi-delta {
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* KPI status colors */
.good-enps, .enps.good-enps {
    background-color: var(--accent);
}

.medium-enps, .enps.medium-enps {
    background-color: var(--accent-orange);
}

.bad-enps, .enps.bad-enps {
    background-color: var(--accent-red);
}

.enps {
    width: 4rem;
    display: inline-block;
    margin-right: 1rem;
    text-align: right;
    padding: 0.15rem 0.5rem;
    color: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ================================================================
   Landing / Hero
   ================================================================ */

.hero-section {
    text-align: center;
    padding: 4rem 1.5rem;
    max-width: 720px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (min-width: 640px) {
    .hero-title {
        font-size: 3.25rem;
    }
    .hero-subtitle {
        font-size: 1.25rem;
    }
}

/* ================================================================
   Feature Grid (Landing)
   ================================================================ */

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin: 3rem auto;
    max-width: 900px;
    padding: 0 1.25rem;
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-md);
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

.feature-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

@media (min-width: 640px) {
    .features-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 900px) {
    .features-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* ================================================================
   Social Proof / Stats
   ================================================================ */

.stats-row {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 3rem auto;
    max-width: 900px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ================================================================
   CTA Section
   ================================================================ */

.cta-section {
    max-width: 540px;
    margin: 3rem auto;
    padding: 2.5rem;
    text-align: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.cta-section h2 {
    margin-bottom: 0.75rem;
}

.cta-section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.cta-section .input-text {
    text-align: center;
}

/* ================================================================
   Auth Pages (Login/Register)
   ================================================================ */

.auth-container {
    max-width: 420px;
    margin: 3rem auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.auth-container h1 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.auth-container .button {
    width: 100%;
}

/* ================================================================
   Dashboard
   ================================================================ */

.dashboard-organization-element {
    margin-bottom: 0.4rem;
}

.dashboard-organization-element a {
    color: var(--text-secondary);
    transition: color var(--transition);
}

.dashboard-organization-element a:hover {
    color: var(--accent);
}

.dashboard-organization-element-highlight {
    font-weight: 600;
}

.dashboard-organization-element-highlight a {
    color: var(--text-primary);
}

/* ================================================================
   Speechbubble (kept for compatibility)
   ================================================================ */

.speechbubble {
    max-width: 100%;
    margin: 2rem auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    background: var(--bg-secondary);
    text-align: center;
    color: var(--text-primary);
    position: relative;
}

.speechbubble:before {
    content: "";
    width: 0;
    height: 0;
    position: absolute;
    border-left: 8px solid var(--border);
    border-right: 8px solid transparent;
    border-top: 8px solid var(--border);
    border-bottom: 8px solid transparent;
    left: 20px;
    bottom: -16px;
}

.speechbubble-detractor { border-left-color: var(--accent-red); }
.speechbubble-passive { border-left-color: var(--accent-orange); }
.speechbubble-promotor { border-left-color: var(--accent); }

/* ================================================================
   Footer
   ================================================================ */

footer {
    margin-top: 4rem;
    padding: 3rem 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

footer h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
}

footer a {
    color: var(--text-secondary);
}

footer a:hover {
    color: var(--accent);
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer li {
    margin-bottom: 0.4rem;
}

/* ================================================================
   Video background (landing hero)
   ================================================================ */

video.fullscreen {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -100;
    transform: translate(-50%, -50%);
    opacity: 0.15;
}

/* Legacy hero heading — kept but restyled */
.superhero {
    display: none;
}

/* ================================================================
   Utilities
   ================================================================ */

.float-right { float: right; }
.margin-bottom-2rem { margin-bottom: 2rem; }
.margin-top-1rem { margin-top: 1rem; }
.no-underline { text-decoration: none; }
.no-underline:hover { color: var(--accent); }
.padding-left-1-6rem { padding-left: 1.6rem; }
.list-style-none > li { list-style: none; }
.highlight-on-hover { color: var(--text-muted); }
.highlight-on-hover:hover { color: var(--text-primary); }
.color-gray { color: var(--text-muted); }
.font-size-small { font-size: 0.9rem; }
.center { text-align: center; }

/* ================================================================
   Responsive
   ================================================================ */

@media (max-width: 639px) {
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.2rem; }
    section { padding: 0 1rem; }
    .header { padding: 0 0.75rem; }
    .header a { padding: 6px 8px; font-size: 0.8rem; }
    .button { padding: 10px 20px; font-size: 0.9rem; }
    .registerForm { padding: 1.5rem 1.25rem; }
    .auth-container { margin: 2rem 1rem; padding: 2rem 1.5rem; }
    .flex-box-container-2-columns { margin-top: 1rem; }
    .stats-row { gap: 2rem; }
    .cta-section { margin: 2rem 1rem; padding: 2rem 1.25rem; }
}
