/* ============================================================
   Matily — landing page styles
   White & blue, professional, responsive
   ============================================================ */

:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --radius: 16px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 30px rgba(37, 99, 235, 0.08), 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 24px 60px rgba(37, 99, 235, 0.14);
  --container: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 12px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-primary { background: linear-gradient(135deg, var(--blue-600), var(--blue-700)); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-ghost { background: #fff; color: var(--blue-700); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--blue-200, #bfdbfe); background: var(--blue-50); }
.btn-white { background: #fff; color: var(--blue-700); }
.btn-white:hover { box-shadow: var(--shadow-lg); }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-outline-white:hover { background: rgba(255,255,255,.12); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.nav.scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-weight: 500; color: var(--ink-2); font-size: 15px; transition: color .15s; }
.nav-links a:hover { color: var(--blue-700); }
.nav-links .btn { color: var(--blue-700); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 88px; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.blob-1 { width: 520px; height: 520px; background: radial-gradient(circle, #60a5fa, transparent 70%); top: -160px; right: -120px; animation: float 14s ease-in-out infinite; }
.blob-2 { width: 460px; height: 460px; background: radial-gradient(circle, #93c5fd, transparent 70%); bottom: -200px; left: -140px; animation: float 18s ease-in-out infinite reverse; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  opacity: .5;
}
@keyframes float { 0%,100% { transform: translate(0,0); } 50% { transform: translate(20px, 30px); } }

.hero-inner { text-align: center; max-width: 820px; margin: 0 auto; }
.pill {
  display: inline-block; padding: 7px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  color: var(--blue-700); background: var(--blue-50); border: 1px solid var(--blue-100); margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 900; }
.grad-text { background: linear-gradient(120deg, var(--blue-600), #06b6d4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); margin: 22px auto 32px; max-width: 640px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 56px; }
.hero-stats div { display: flex; flex-direction: column; gap: 2px; }
.hero-stats strong { font-size: 1.7rem; font-weight: 800; color: var(--blue-700); }
.hero-stats span { font-size: 13px; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-600); margin-bottom: 12px; }
.eyebrow-light { color: #bfdbfe; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -0.02em; font-weight: 800; }
.section-head p { color: var(--muted); margin-top: 14px; font-size: 1.05rem; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Value cards ---------- */
.value { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.value:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.value-ico { width: 48px; height: 48px; display: grid; place-items: center; font-size: 22px; background: var(--blue-50); border-radius: 12px; margin-bottom: 16px; }
.value h3 { font-size: 1.15rem; margin-bottom: 8px; }
.value p { color: var(--muted); font-size: .95rem; }

/* ---------- Software cards ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: #cdddfb; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-top h3 { font-size: 1.3rem; }
.card p { color: var(--ink-2); font-size: .98rem; flex: 1; }
.tag { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.tag-js { background: #fef9c3; color: #854d0e; }
.tag-py { background: #dbeafe; color: #1e40af; }
.tag-html { background: #ffedd5; color: #9a3412; }
.tag-css { background: #e0e7ff; color: #3730a3; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.chip { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg-alt); border: 1px solid var(--line); padding: 5px 11px; border-radius: 8px; }
.card-links { display: flex; gap: 14px; }
.card-links a { color: var(--blue-700); font-weight: 600; font-size: 14px; transition: opacity .15s; }
.card-links a:hover { opacity: .7; }

/* Upcoming */
.card.soon { background: linear-gradient(180deg, #fff, var(--blue-50)); }
.soon-badge { display: inline-block; font-size: 12px; font-weight: 700; color: var(--blue-700); background: #fff; border: 1px solid var(--blue-100); padding: 4px 11px; border-radius: 999px; margin-bottom: 14px; align-self: flex-start; }
.card.soon h3 { font-size: 1.2rem; margin-bottom: 8px; }
.card.soon p { color: var(--muted); font-size: .95rem; }
.upcoming-cta { text-align: center; margin-top: 40px; }

/* ---------- Founder ---------- */
.founder { display: grid; grid-template-columns: 200px 1fr; gap: 40px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 40px; box-shadow: var(--shadow-md); }
.founder-photo img { width: 180px; height: 180px; border-radius: 24px; object-fit: cover; border: 4px solid #fff; box-shadow: var(--shadow-lg); }
.founder-body h2 { font-size: 2rem; letter-spacing: -0.02em; }
.founder-role { color: var(--blue-700); font-weight: 600; margin: 4px 0 14px; }
.founder-body p { color: var(--ink-2); }
.founder-links { display: flex; gap: 12px; margin-top: 20px; }

/* ---------- Donate ---------- */
.donate { background: linear-gradient(135deg, var(--blue-700), var(--blue-800)); }
.donate-card { text-align: center; max-width: 720px; margin: 0 auto; color: #fff; }
.donate-card h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
.donate-card > p { color: #dbeafe; margin: 16px auto 28px; max-width: 560px; }
.donate-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.donate-note { font-size: 14px; color: #bfdbfe; margin-top: 22px; }
.donate-note a { color: #fff; text-decoration: underline; }

/* ---------- Contact ---------- */
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; text-align: center; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.contact-ico { width: 52px; height: 52px; margin: 0 auto 14px; display: grid; place-items: center; font-size: 22px; font-weight: 800; color: var(--blue-700); background: var(--blue-50); border-radius: 14px; }
.contact-card h3 { font-size: 1.1rem; margin-bottom: 4px; }
.contact-card p { color: var(--muted); font-size: .95rem; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #cbd5e1; padding: 56px 0 28px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand { max-width: 320px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { margin-top: 14px; font-size: .95rem; color: #94a3b8; }
.footer-cols { display: flex; gap: 64px; }
.footer-cols h4 { color: #fff; font-size: 14px; margin-bottom: 14px; letter-spacing: .04em; }
.footer-cols a { display: block; color: #94a3b8; font-size: .95rem; margin-bottom: 10px; transition: color .15s; }
.footer-cols a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 24px; font-size: 13px; color: #64748b; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: column; }
}
@media (max-width: 768px) {
  .nav-links {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 24px 20px;
    transform: translateY(-120%); transition: transform .3s ease; box-shadow: var(--shadow-md);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 12px; border: 1px solid var(--line); }
  .nav-toggle { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 28px 18px; }
  .founder { grid-template-columns: 1fr; text-align: center; padding: 32px 24px; }
  .founder-photo { margin: 0 auto; }
  .founder-links { justify-content: center; }
}

/* ---------- Icons (emoji-free) ---------- */
.value-ico { color: var(--blue-600); }
.value-ico svg { width: 26px; height: 26px; }
.contact-ico svg { width: 26px; height: 26px; }

/* ---------- Featured project ---------- */
.featured { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.featured-info h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); letter-spacing: -0.02em; font-weight: 800; }
.featured-tagline { font-style: italic; color: var(--blue-700); font-size: 1.15rem; font-weight: 600; margin: 8px 0 16px; }
.featured-info > p { color: var(--ink-2); }
.featured-list { list-style: none; margin: 20px 0; display: grid; gap: 11px; }
.featured-list li { display: flex; gap: 11px; align-items: flex-start; color: var(--ink-2); font-size: .98rem; }
.li-ico { width: 20px; height: 20px; color: var(--blue-600); flex-shrink: 0; margin-top: 2px; }
.featured-works { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 24px; }
.works-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.featured-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.featured-media { min-width: 0; }
.media-frame { background: #0f172a; border-radius: 16px; padding: 14px; box-shadow: var(--shadow-lg); }
.media-dots { display: flex; gap: 7px; margin-bottom: 11px; padding-left: 4px; }
.media-dots span { width: 11px; height: 11px; border-radius: 50%; background: #475569; }
.media-dots span:nth-child(1) { background: #ef4444; }
.media-dots span:nth-child(2) { background: #f59e0b; }
.media-dots span:nth-child(3) { background: #22c55e; }
.media-frame img { width: 100%; border-radius: 8px; display: block; }

@media (max-width: 768px) {
  .featured { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Roadmap card extras ---------- */
.soon-badge.live { color: #15803d; background: #dcfce7; border-color: #bbf7d0; }
.soon-badge.beta { color: #b45309; background: #fef3c7; border-color: #fde68a; }
.soon-link { align-self: flex-start; margin-top: 14px; color: var(--blue-700); font-weight: 600; font-size: 14px; transition: opacity .15s; }
.soon-link:hover { opacity: .7; }
.card.soon code { background: #fff; border: 1px solid var(--blue-100); padding: 1px 7px; border-radius: 6px; font-size: .85em; color: var(--blue-700); font-family: Consolas, monospace; white-space: nowrap; }
