/* ============================================
   Fikua Lab — Landing Page
   Color system: Teal (#2A9D8F) + Berry (#c2185b)
   Shared neutrals with oriolcanades.com
   ============================================ */

/* --- Light mode (default) --- */
:root {
    --accent: #2A9D8F;
    --accent-hover: #238578;
    --accent-subtle: rgba(42, 157, 143, 0.08);
    --berry: #c2185b;
    --berry-hover: #a11445;
    --berry-subtle: rgba(194, 24, 91, 0.08);

    --heading: #1B263B;
    --text: #3A3A3C;
    --text-muted: #6B7280;
    --bg: #ffffff;
    --bg-alt: #f8f9fa;
    --surface: #ffffff;
    --border: #e5e7eb;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Menlo', monospace;
    --radius: 8px;
    --radius-lg: 12px;
    --max-width: 1040px;
}

/* --- Dark mode --- */
[data-theme="dark"] {
    --accent: #2dd4bf;
    --accent-hover: #5eead4;
    --accent-subtle: rgba(45, 212, 191, 0.1);
    --berry: #f06292;
    --berry-hover: #f48fb1;
    --berry-subtle: rgba(240, 98, 146, 0.1);

    --heading: #e2e8f0;
    --text: #cbd5e1;
    --text-muted: #94a3b8;
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --surface: #1e293b;
    --border: #334155;
}

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s, color 0.3s;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); }

h1, h2, h3 { color: var(--heading); line-height: 1.3; }

/* --- Nav --- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.85);
    transition: background 0.3s, border-color 0.3s;
}

[data-theme="dark"] .nav {
    background: rgba(15, 23, 42, 0.85);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--heading);
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: #fff;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.15s;
}

.nav-links a:hover { color: var(--heading); }

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.35rem;
    cursor: pointer;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, border-color 0.15s;
}

.theme-toggle:hover { color: var(--heading); border-color: var(--text-muted); }

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* --- Hero --- */
.hero {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 5rem 1.5rem 4rem;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--berry);
    background: var(--berry-subtle);
    border: 1px solid var(--berry);
    border-radius: 20px;
    padding: 0.3rem 0.9rem;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

.highlight {
    color: var(--accent);
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    color: var(--heading);
}

/* --- Sections --- */
section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

section h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    letter-spacing: -0.01em;
}

.section-sub {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 560px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

/* --- Roles Grid --- */
.roles { border-top: 1px solid var(--border); }

.roles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.role-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.role-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-subtle);
}

.role-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.issuer-icon { background: var(--accent-subtle); color: var(--accent); }
.holder-icon { background: var(--accent-subtle); color: var(--accent); }
.verifier-icon { background: var(--accent-subtle); color: var(--accent); }

.role-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.role-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.role-specs {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.role-specs li {
    font-size: 0.7rem;
    font-family: var(--mono);
    background: var(--bg-alt);
    color: var(--text-muted);
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* --- Conformance --- */
.conformance { border-top: 1px solid var(--border); }

.conformance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.conf-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: border-color 0.15s;
}

.conf-card:hover { border-color: var(--accent); }

.conf-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.conf-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    flex: 1;
}

.conf-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.conf-card-count {
    font-size: 0.75rem;
    font-family: var(--mono);
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-alt);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.conf-config-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.conf-config-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
}

.conf-config-item:last-child { border-bottom: none; }

.conf-config-name {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: var(--text-muted);
}

.conf-btn {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius);
    white-space: nowrap;
    text-decoration: none;
    cursor: default;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.conf-btn-passed {
    background: rgba(42, 157, 143, 0.12);
    color: var(--accent);
    border: 1px solid var(--accent);
    cursor: pointer;
}

.conf-btn-passed:hover {
    background: rgba(42, 157, 143, 0.2);
    box-shadow: 0 1px 4px rgba(42, 157, 143, 0.15);
    color: var(--accent);
}

.conf-btn-pending {
    background: var(--bg-alt);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.conf-card-soon { opacity: 0.6; }

.conf-card-soon-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.conf-progress {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    font-family: var(--mono);
}

/* --- Profiles --- */
.profiles { border-top: 1px solid var(--border); }

.profile-demo {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 480px;
}

.profile-example {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.profile-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    flex-shrink: 0;
}

.profile-dot.active { background: var(--accent); }

.profile-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--heading);
}

.profile-tag {
    font-size: 0.7rem;
    font-family: var(--mono);
    background: var(--bg-alt);
    color: var(--text-muted);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.profile-config {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.profile-config span {
    font-size: 0.7rem;
    font-family: var(--mono);
    color: var(--text-muted);
    background: var(--bg-alt);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

/* --- Stack --- */
.stack { border-top: 1px solid var(--border); }

.stack-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stack-item {
    padding: 1.25rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.stack-item strong {
    display: block;
    font-size: 0.9rem;
    color: var(--heading);
    margin-bottom: 0.3rem;
}

.stack-item span {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- About --- */
.about {
    border-top: 1px solid var(--border);
}

.about-content {
    max-width: 600px;
}

.about-content p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.about-content strong { color: var(--heading); }

.about-tagline {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    font-style: italic;
}

.about-links {
    display: flex;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.about-links a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.15s;
}

.about-links a:hover { color: var(--accent); }

/* --- Footer --- */
.footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--accent); }

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero { padding: 3rem 1.25rem 2.5rem; }
    .hero h1 { font-size: 1.75rem; }

    .roles-grid,
    .conformance-grid,
    .stack-grid {
        grid-template-columns: 1fr;
    }

    .nav-links a:not(:last-of-type) {
        display: none;
    }

    section { padding: 2.5rem 1.25rem; }
}

@media (max-width: 480px) {
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-actions .btn { width: 100%; justify-content: center; }
}
