/* ===========================
   marseamer.fr — Startup aesthetic
   Inspiration: Linear, Arc Browser, Raycast
   Fonts: Sora (display), Nunito (body)
   =========================== */

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

:root {
  --color-bg: #0a0e1a;
  --color-surface: #111827;
  --color-surface-glass: rgba(17, 24, 39, 0.6);
  --color-accent: #3b82f6;
  --color-accent-soft: rgba(59, 130, 246, 0.15);
  --color-accent-glow: rgba(59, 130, 246, 0.3);
  --color-sea: #06b6d4;
  --color-sea-soft: rgba(6, 182, 212, 0.12);
  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-text-dim: #64748b;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(255, 255, 255, 0.15);
  --color-glass-bg: rgba(255, 255, 255, 0.04);
  --color-glass-border: rgba(255, 255, 255, 0.06);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-display: 'Sora', sans-serif;
  --font-body: 'Nunito', sans-serif;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }

p {
  color: var(--color-text-muted);
  max-width: 68ch;
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-accent), var(--color-sea));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Background decorative elements --- */
body::before {
  content: '';
  position: fixed;
  top: -40%;
  left: -20%;
  width: 80%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -30%;
  right: -15%;
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(6, 182, 212, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  background: rgba(10, 14, 26, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-sea));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.nav-desktop {
  display: none;
}

.nav-desktop a {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-desktop a:hover {
  color: var(--color-text);
  background: var(--color-glass-bg);
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.menu-toggle:hover {
  border-color: var(--color-border-hover);
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
}

/* Mobile menu */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.mobile-nav a:hover {
  color: var(--color-text);
}

.mobile-nav-close {
  position: absolute;
  top: 1.1rem;
  right: 1.25rem;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Hero / Accroche --- */
.hero {
  position: relative;
  padding: 8rem 0 4rem;
  overflow: hidden;
  z-index: 1;
}

.hero-bg-gradient {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 20%, rgba(59, 130, 246, 0.1) 0%, rgba(6, 182, 212, 0.05) 40%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-sea);
  background: var(--color-sea-soft);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero p {
  font-size: 1.15rem;
  margin: 0 auto 2rem;
  color: var(--color-text-muted);
}

.hero-image {
  margin-top: 3rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-glow);
}

.hero-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16 / 7;
}

/* --- Section spacing --- */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 0;
}

.section-header {
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: 1.05rem;
}

/* --- Category Pills --- */
.categories-section {
  padding: 3rem 0;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-glass-bg);
  border: 1px solid var(--color-glass-border);
  border-radius: 100px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s ease;
  cursor: pointer;
}

.category-pill:hover {
  color: var(--color-text);
  background: var(--color-accent-soft);
  border-color: rgba(59, 130, 246, 0.25);
  transform: translateY(-1px);
}

.category-pill .pill-icon {
  font-size: 1rem;
  line-height: 1;
}

/* --- Articles Grid (Bento / overlapping cards) --- */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.article-card {
  position: relative;
  background: var(--color-surface-glass);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-border-hover);
}

.article-card:hover .card-image img {
  transform: scale(1.04);
}

.card-image {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--color-surface);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-body {
  padding: 1.4rem 1.5rem 1.6rem;
}

.card-number {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.card-number .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--color-accent-soft);
  font-size: 0.7rem;
  color: var(--color-accent);
}

.card-body h3 {
  margin-bottom: 0.6rem;
}

.card-body h3 a {
  color: var(--color-text);
  transition: color 0.2s;
}

.card-body h3 a:hover {
  color: var(--color-accent);
}

.card-body .card-excerpt {
  font-size: 0.92rem;
  color: var(--color-text-dim);
  line-height: 1.6;
}

.card-tag {
  display: inline-block;
  margin-top: 0.9rem;
  padding: 0.25rem 0.65rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-sea);
  background: var(--color-sea-soft);
  border-radius: 100px;
  letter-spacing: 0.04em;
}

/* Overlapping effect on 3-col grid */
@media (min-width: 768px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .article-card:nth-child(odd) {
    transform: translateY(0);
  }

  .article-card:nth-child(even) {
    transform: translateY(24px);
  }

  .article-card:nth-child(even):hover {
    transform: translateY(18px);
  }
}

@media (min-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .article-card:nth-child(3n+1) {
    transform: translateY(0);
  }

  .article-card:nth-child(3n+2) {
    transform: translateY(32px);
  }

  .article-card:nth-child(3n+3) {
    transform: translateY(12px);
  }

  .article-card:nth-child(3n+2):hover {
    transform: translateY(26px);
  }

  .article-card:nth-child(3n+3):hover {
    transform: translateY(6px);
  }

  /* Extra bottom margin to account for overlap */
  .articles-grid {
    margin-bottom: 3rem;
  }
}

/* Featured card (first) spans 2 columns on desktop */
@media (min-width: 1024px) {
  .article-card.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    transform: translateY(0) !important;
  }

  .article-card.featured:hover {
    transform: translateY(-6px) !important;
  }

  .article-card.featured .card-image {
    aspect-ratio: auto;
    height: 100%;
  }

  .article-card.featured .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
  }
}

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

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1.25rem;
  font-size: 1.02rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stat-card {
  background: var(--color-glass-bg);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-accent), var(--color-sea));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.stat-card .stat-label {
  font-size: 0.82rem;
  color: var(--color-text-dim);
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
  }
}

/* --- FAQ Section --- */
.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 800px;
}

.faq-item {
  background: var(--color-glass-bg);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.6rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.2s;
}

.faq-item:hover {
  border-color: var(--color-border-hover);
}

.faq-item dt {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.faq-item dt::before {
  content: 'Q';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 0.1rem;
}

.faq-item dd {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  padding-left: 2.1rem;
  line-height: 1.65;
}

/* --- Newsletter CTA --- */
.newsletter-section {
  text-align: center;
}

.newsletter-box {
  max-width: 560px;
  margin: 0 auto;
  background: var(--color-surface-glass);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-glow);
}

.newsletter-box h2 {
  margin-bottom: 0.75rem;
}

.newsletter-box p {
  margin: 0 auto 1.5rem;
  text-align: center;
}

.newsletter-form {
  display: flex;
  gap: 0.6rem;
  max-width: 400px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--color-glass-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-form input::placeholder {
  color: var(--color-text-dim);
}

.newsletter-form input:focus {
  border-color: var(--color-accent);
}

.newsletter-form button {
  padding: 0.75rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--color-accent), var(--color-sea));
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.newsletter-form button:hover {
  opacity: 0.9;
}

@media (max-width: 480px) {
  .newsletter-form {
    flex-direction: column;
  }
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--color-text-dim);
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 0.82rem;
  color: var(--color-text-dim);
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* --- Article Content (for future article pages) --- */
.article-page {
  padding: 7rem 0 4rem;
}

.article-page .container {
  max-width: 780px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--color-text-dim);
  margin-bottom: 2rem;
}

.breadcrumb a {
  color: var(--color-text-muted);
  transition: color 0.2s;
}

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

.breadcrumb .sep {
  opacity: 0.4;
}

.article-header {
  margin-bottom: 2.5rem;
}

.article-header h1 {
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--color-text-dim);
}

.article-cover {
  margin-bottom: 2.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-content h2 {
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.article-content h3 {
  margin: 2rem 0 0.75rem;
}

.article-content p {
  margin-bottom: 1.25rem;
  max-width: none;
}

.article-content ul,
.article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--color-text-muted);
}

.article-content li {
  margin-bottom: 0.4rem;
}

.article-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--color-glass-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-text-muted);
  font-style: italic;
}

.article-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: rgba(59, 130, 246, 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}

.article-content a:hover {
  text-decoration-color: var(--color-accent);
}

/* --- Desktop nav visible --- */
@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }

  .menu-toggle {
    display: none;
  }
}

/* --- Section divider --- */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  margin: 0;
  border: none;
}
