/* ═══════════════════════════════════════════
   moci.uk — Design System & Styles
   ═══════════════════════════════════════════ */

/* ── Light mode ─────────────────────────── */
:root {
    --bg-page: #FAF8F5;
    --bg-card: #FFFFFF;
    --bg-subtle: #F5F1EC;
    --bg-hover: rgba(0,0,0,0.02);

    --text-primary: #1C1917;
    --text-secondary: #6B6560;
    --text-tertiary: #9E9892;
    --text-inverse: #FFFFFF;

    --accent: #CC785C;
    --accent-hover: #B8674D;
    --accent-soft: rgba(204,120,92,0.08);
    --accent-glow: rgba(204,120,92,0.22);

    --green: #2D7A3F;
    --green-soft: rgba(45,122,63,0.08);

    --border: rgba(0,0,0,0.07);
    --border-strong: rgba(0,0,0,0.12);
    --border-card: rgba(0,0,0,0.06);

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.03);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.06);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.08);
    --shadow-glow: 0 0 0 4px var(--accent-soft);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 999px;

    --font-serif: 'Noto Serif SC', ui-serif, Georgia, serif;
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', Consolas, monospace;

    --transition-fast: 0.18s cubic-bezier(0.4,0,0.2,1);
    --transition-smooth: 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* ── Dark mode ──────────────────────────── */
[data-theme="dark"] {
    --bg-page: #1B1B1B;
    --bg-card: #242424;
    --bg-subtle: #2A2A2A;
    --bg-hover: rgba(255,255,255,0.03);

    --text-primary: #ECECEC;
    --text-secondary: #9E9A95;
    --text-tertiary: #6E6A65;
    --text-inverse: #1B1B1B;

    --accent: #E07D5E;
    --accent-hover: #EB8E73;
    --accent-soft: rgba(224,125,94,0.10);
    --accent-glow: rgba(224,125,94,0.26);

    --green: #6BA368;
    --green-soft: rgba(107,163,104,0.10);

    --border: rgba(255,255,255,0.06);
    --border-strong: rgba(255,255,255,0.10);
    --border-card: rgba(255,255,255,0.05);

    --shadow-xs: none;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.12);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.18);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.24);
    --shadow-glow: 0 0 0 4px var(--accent-soft);
}

@media (prefers-color-scheme: dark) {
    [data-theme="system"] {
        --bg-page: #1B1B1B;
        --bg-card: #242424;
        --bg-subtle: #2A2A2A;
        --bg-hover: rgba(255,255,255,0.03);
        --text-primary: #ECECEC;
        --text-secondary: #9E9A95;
        --text-tertiary: #6E6A65;
        --text-inverse: #1B1B1B;
        --accent: #E07D5E;
        --accent-hover: #EB8E73;
        --accent-soft: rgba(224,125,94,0.10);
        --accent-glow: rgba(224,125,94,0.26);
        --green: #6BA368;
        --green-soft: rgba(107,163,104,0.10);
        --border: rgba(255,255,255,0.06);
        --border-strong: rgba(255,255,255,0.10);
        --border-card: rgba(255,255,255,0.05);
        --shadow-xs: none;
        --shadow-sm: 0 2px 8px rgba(0,0,0,0.12);
        --shadow-md: 0 8px 24px rgba(0,0,0,0.18);
        --shadow-lg: 0 16px 48px rgba(0,0,0,0.24);
        --shadow-glow: 0 0 0 4px var(--accent-soft);
    }
}

/* ═══════════════════════════════════════════
   Reset & Base
   ═══════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-sans);
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    opacity: 0;
    animation: pageEnter 0.7s cubic-bezier(0.22,0.61,0.36,1) forwards;
    transition: background var(--transition-smooth), color var(--transition-smooth);
}

@keyframes pageEnter {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.container { max-width: 800px; margin: 0 auto; padding: 0 28px; }

/* ═══════════════════════════════════════════
   Header
   ═══════════════════════════════════════════ */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 36px 0;
    margin-bottom: 56px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 550;
    font-size: 1.05rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    text-decoration: none;
    user-select: none;
}

.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.08); }
.logo:hover .logo-text   { opacity: 0.7; }

.logo-mark {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    transition: transform var(--transition-smooth);
}

.logo-mark svg { display: block; width: 100%; height: 100%; }

.logo-text { transition: opacity var(--transition-fast); }

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    letter-spacing: -0.01em;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    background: var(--bg-subtle);
}

.status-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px var(--green-soft);
    animation: pulseDot 2.4s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.45; transform: scale(1.5); }
}

/* ── Toolbar buttons ── */
.tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--bg-card);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 550;
    letter-spacing: -0.01em;
    padding: 0;
    line-height: 1;
    box-shadow: var(--shadow-xs);
}

.tool-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-strong);
    background: var(--bg-subtle);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.tool-btn svg {
    width: 16px;
    height: 16px;
}

.lang-btn { width: auto; padding: 0 10px; }

/* ═══════════════════════════════════════════
   Hero
   ═══════════════════════════════════════════ */
.hero {
    text-align: center;
    padding: 16px 0 96px;
    max-width: 680px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: var(--radius-full);
    font-size: 0.84rem;
    font-weight: 530;
    letter-spacing: 0.01em;
    margin-bottom: 36px;
}

.hero-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: 3.2rem;
    font-weight: 580;
    letter-spacing: -0.025em;
    line-height: 1.14;
    color: var(--text-primary);
    margin-bottom: 24px;
    transition: color var(--transition-smooth);
}

.hero h1 em {
    font-style: normal;
    color: var(--accent);
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 44px;
    line-height: 1.7;
    font-weight: 420;
    transition: color var(--transition-smooth);
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
}

/* ── Buttons (matching GravatarProxy style) ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-weight: 520;
    font-size: 0.975rem;
    text-decoration: none;
    transition: all var(--transition-smooth);
    cursor: pointer;
    letter-spacing: -0.005em;
    font-family: var(--font-sans);
    white-space: nowrap;
    line-height: 1.4;
}

.btn-primary {
    background: var(--accent);
    color: #FFFFFF;
    box-shadow: 0 4px 16px var(--accent-glow);
    border: none;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
    background: var(--bg-subtle);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn svg { flex-shrink: 0; }

/* ═══════════════════════════════════════════
   Services Section
   ═══════════════════════════════════════════ */
.services {
    padding: 72px 0 80px;
    border-top: 1px solid var(--border);
}

.section-label {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 22px;
}

.project-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Project card ── */
.project-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-card);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transform: translateY(-2px);
}

.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top right, var(--accent-soft), transparent 65%);
    opacity: 0;
    transition: opacity var(--transition-smooth);
    pointer-events: none;
}

.project-card:hover::after { opacity: 1; }

.project-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: all var(--transition-smooth);
}

.project-card:hover .project-icon {
    background: var(--accent-soft);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.project-icon svg {
    width: 24px;
    height: 24px;
    transition: transform var(--transition-smooth);
}

.project-card:hover .project-icon svg {
    transform: scale(1.08);
}

.project-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.project-info h3 {
    font-size: 1rem;
    font-weight: 550;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.project-info .domain {
    font-size: 0.82rem;
    color: var(--accent);
    font-family: var(--font-mono);
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.project-info p {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    line-height: 1.55;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.tag {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    background: var(--bg-subtle);
    color: var(--text-tertiary);
    white-space: nowrap;
    transition: background var(--transition-smooth), color var(--transition-smooth);
}

.tag-live {
    background: var(--green-soft);
    color: var(--green);
}

.project-arrow {
    flex-shrink: 0;
    color: var(--text-tertiary);
    transition: all var(--transition-smooth);
    position: relative;
    z-index: 1;
}

.project-card:hover .project-arrow {
    color: var(--accent);
    transform: translateX(3px);
}

/* ── Placeholder ── */
.project-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px 24px;
    border-radius: var(--radius-lg);
    border: 1.5px dashed var(--border-strong);
    color: var(--text-tertiary);
    font-size: 0.9rem;
    letter-spacing: -0.01em;
    transition: all var(--transition-smooth);
}

.project-placeholder:hover {
    border-color: var(--text-tertiary);
    color: var(--text-secondary);
    background: var(--bg-hover);
}

.project-placeholder svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* ═══════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════ */
footer {
    padding: 60px 0 48px;
    border-top: 1px solid var(--border);
    transition: border-color var(--transition-smooth);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.footer-content p {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    font-weight: 420;
    line-height: 1.6;
}

.disclaimer {
    max-width: 460px;
    font-size: 0.825rem !important;
    line-height: 1.65 !important;
}

.footer-sep {
    display: inline-block;
    margin: 0 8px;
    color: var(--border-strong);
}

/* ═══════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════ */
@media (max-width: 640px) {
    .container      { padding: 0 20px; }
    header          { padding: 28px 0; margin-bottom: 32px; }

    .hero           { padding: 8px 0 56px; }
    .hero h1        { font-size: 2.2rem; }
    .hero p         { font-size: 1rem; }

    .hero-actions   { flex-direction: column; align-items: center; }
    .btn            { width: 100%; max-width: 280px; }

    .project-card   { flex-wrap: wrap; gap: 12px; padding: 16px 18px; }
    .project-meta   { width: 100%; margin-left: 58px; }
    .status-dot     { display: none; }

    .services       { padding: 48px 0 56px; }
    footer          { padding: 40px 0 36px; }
}

@media (max-width: 380px) {
    .hero h1        { font-size: 1.85rem; }
    .project-info p { display: none; }
}
