/* Design tokens: colors and fonts reused across the whole site */
:root {
    --color-bg-dark: #0F1222;
    --color-bg-darker: #171A2E;
    --color-purple: #9D7CFF;
    --color-blue: #62B6FF;
    --color-orange: #FF9A62;
    --color-text-light: #F5F5F7;
    --color-text-muted: #A0A3B1;
    --font-title: 'Sora', sans-serif;
    --font-text: 'Inter', sans-serif;
}

/* Basic reset: same starting point in every browser */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-text);
    color: var(--color-text-light);
    background: var(--color-bg-dark);
    line-height: 1.6;
}

h1, h2, h3 { font-family: var(--font-title); font-weight: 700; margin-bottom: 1rem; }

/* Centered wrapper used on every page */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* --- Header --- */
/* position: sticky keeps the navigation visible while scrolling */
.site-header { background: var(--color-bg-darker); padding: 1rem 0; position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { font-family: var(--font-title); font-size: 1.4rem; color: var(--color-text-light); text-decoration: none; }
.logo span { color: var(--color-purple); }
.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.main-nav a { color: var(--color-text-light); text-decoration: none; font-size: 0.95rem; }
.main-nav a:hover { color: var(--color-purple); }

/* Burger button: hidden on desktop, shown on mobile (see media query below) */
.burger { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; }
.burger span { width: 24px; height: 2px; background: var(--color-text-light); }

/* --- Buttons --- */
.btn { display: inline-block; padding: 0.7rem 1.4rem; border-radius: 8px; text-decoration: none; font-weight: 600; cursor: pointer; border: none; font-family: var(--font-text); }
.btn-primary { background: linear-gradient(90deg, var(--color-orange), var(--color-purple)); color: #fff; }
.btn-secondary { background: transparent; border: 1px solid var(--color-text-light); color: var(--color-text-light); }

/* --- Hero --- */
/* flex-wrap lets the two columns stack automatically on small screens */
.hero { padding: 5rem 0; }
.hero-inner { display: flex; align-items: center; gap: 3rem; flex-wrap: wrap; }
.hero-inner > div:first-child { flex: 1; min-width: 280px; }
.hero h1 { font-size: 2.4rem; }
.hero p { color: var(--color-text-muted); margin-bottom: 1.5rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-visual { flex: 1; min-width: 280px; min-height: 260px; background: var(--color-bg-darker); border-radius: 16px; }

/* --- Sections --- */
.section { padding: 4rem 0; }
.section-alt { background: var(--color-bg-darker); }
.page-header { padding: 3rem 0 1rem; text-align: center; }
.page-header p { color: var(--color-text-muted); max-width: 600px; margin: 0 auto; }
.page-header-split { text-align: left; }
.page-header-inner { display: flex; align-items: center; gap: 3rem; flex-wrap: wrap; }
.page-header-inner > div:first-child { flex: 1; min-width: 280px; }
.page-header-inner p { margin: 0; }
.page-header-visual { flex: 1; min-width: 280px; }
/* object-fit: cover keeps the image ratio without stretching it */
.page-header-visual img { width: 100%; height: 280px; object-fit: cover; border-radius: 16px; display: block; }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; display: block; }

.section-subtitle { margin-top: 3rem; margin-bottom: 1.5rem; }
/* auto-fit + minmax: the grid adapts the number of columns to the screen width */
.examples-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.example-card { background: var(--color-bg-darker); border-radius: 12px; overflow: hidden; }
.example-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.example-card-body { padding: 1.2rem; }
.example-tag { display: block; font-size: 0.8rem; color: var(--color-purple); font-weight: 600; margin-bottom: 0.4rem; }
.example-card-body strong { display: block; font-size: 1.1rem; margin-bottom: 0.4rem; }
.example-card-body p { color: var(--color-text-muted); font-size: 0.9rem; margin: 0; }

/* --- Cards --- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.card { background: var(--color-bg-darker); padding: 1.5rem; border-radius: 12px; }
.card-icon { width: 44px; height: 44px; border-radius: 10px; background: rgba(157, 124, 255, 0.15); color: var(--color-purple); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.card .price { color: var(--color-orange); font-weight: 700; margin-top: 0.5rem; }
.persona-card { background: var(--color-bg-dark); border: 1px solid var(--color-bg-darker); }
.persona-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--color-purple), var(--color-blue)); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-title); font-weight: 700; margin-bottom: 0.8rem; }
.persona-avatar-2 { background: linear-gradient(135deg, var(--color-orange), var(--color-purple)); }
.persona-avatar-3 { background: linear-gradient(135deg, var(--color-blue), #4ADE80); }
.persona-role { display: block; color: var(--color-purple); font-size: 0.85rem; font-weight: 600; margin-bottom: 0.6rem; }

/* --- Stats --- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; text-align: center; }
.stat-card { background: var(--color-bg-dark); border: 1px solid var(--color-bg-darker); padding: 1.5rem; border-radius: 12px; }
.stat-card strong { display: block; font-size: 1.8rem; color: var(--color-purple); font-family: var(--font-title); }
.stat-card span { color: var(--color-text-muted); font-size: 0.9rem; }

/* --- CTA --- */
.cta-section, .cta-inline { text-align: center; padding: 3rem 0; }
.cta-inline { margin-top: 2rem; }

/* --- Forms --- */
form { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 1.5rem; }
label { font-size: 0.9rem; color: var(--color-text-muted); margin-top: 0.8rem; }
input, textarea { padding: 0.7rem; border-radius: 8px; border: 1px solid var(--color-bg-darker); background: var(--color-bg-darker); color: var(--color-text-light); font-family: var(--font-text); }
button[type="submit"] { margin-top: 1.5rem; }

.contact-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.contact-infos ul { list-style: none; margin-top: 1rem; display: flex; flex-direction: column; gap: 1rem; }

/* Feedback messages shown after a form submission */
.alert { padding: 0.8rem 1rem; border-radius: 8px; margin: 1rem 0; }
.alert-success { background: rgba(98, 182, 100, 0.15); color: #7ED08A; }
.alert-error { background: rgba(255, 100, 100, 0.15); color: #FF8080; }

/* --- Admin --- */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.dashboard-card { background: var(--color-bg-darker); padding: 1.5rem; border-radius: 12px; text-align: center; }
.dashboard-card strong { display: block; font-size: 2rem; color: var(--color-purple); }
.dashboard-card a { color: var(--color-blue); display: inline-block; margin-top: 0.5rem; }

.admin-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
.admin-table th, .admin-table td { text-align: left; padding: 0.7rem; border-bottom: 1px solid var(--color-bg-darker); }
.admin-table a { color: var(--color-blue); text-decoration: none; }
/* Button styled as a link (used inside POST forms for delete actions) */
.btn-link { background: none; border: none; color: var(--color-blue); text-decoration: underline; cursor: pointer; font-family: var(--font-text); font-size: 0.9rem; padding: 0; margin-right: 0.5rem; }

/* --- Footer --- */
.site-footer { background: var(--color-bg-darker); padding: 1.5rem 0; text-align: center; color: var(--color-text-muted); font-size: 0.85rem; }
.footer-admin-link { display: block; margin-top: 0.5rem; color: var(--color-text-muted); }

/* --- Responsive --- */
/* Tablet and mobile: the nav becomes a burger menu opened with JavaScript */
@media (max-width: 768px) {
    .main-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-bg-darker); padding: 1rem 1.5rem; }
    .main-nav.open { display: flex; }
    .burger { display: flex; }
    .contact-grid { grid-template-columns: 1fr; }
    .page-header-inner { flex-direction: column; }
    .page-header-visual img { height: 200px; }
}

/* Landscape orientation with little height available (example: phone turned sideways):
   the header visual is reduced to leave more room for the actual content. */
@media (orientation: landscape) and (max-height: 500px) {
    .page-header-visual img { height: 140px; }
    .hero { padding-top: 1.5rem; padding-bottom: 1.5rem; }
}

/* Portrait orientation on a narrow screen (example: phone held normally):
   the contact grid switches to a single column, like on classic mobile. */
@media (orientation: portrait) and (max-width: 480px) {
    .contact-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
}