/* ========================================
   Timo — Design System & Global Styles
   ======================================== */

/* --- Google Font --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- Variables --- */
:root {
  --purple: #5B4FD6;
  --purple-dark: #3B2FB0;
  --purple-light: #8B82E8;
  --mint: #A8F0D6;
  --mint-dark: #6FD9B0;
  --ink: #0F0B2E;
  --cream: #FAF8F3;
  --sand: #F0ECE1;
  --white: #FFFFFF;
  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --shadow: 0 4px 24px rgba(15,11,46,0.08);
  --shadow-lg: 0 12px 40px rgba(15,11,46,0.12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --max-w: 1200px;
  --max-w-sm: 900px;
  --header-h: 72px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }

/* --- Utilities --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.container-sm { max-width: var(--max-w-sm); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.text-center { text-align: center; }
.text-muted { color: rgba(15,11,46,0.55); }
.text-purple { color: var(--purple); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

/* --- Background patterns --- */
.bg-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(91,79,214,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(91,79,214,0.06) 1px, transparent 1px);
  background-size: 56px 56px;
}
.bg-blob {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 60% at 50% 40%, rgba(168,240,214,0.55) 0%, rgba(168,240,214,0) 70%),
    radial-gradient(50% 50% at 80% 20%, rgba(139,130,232,0.4) 0%, rgba(139,130,232,0) 70%);
}

/* --- Animations --- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-fade-up { animation: fadeUp 0.7s ease-out both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ========================================
   HEADER / NAVBAR
   ======================================== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(250,248,243,0.8);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(15,11,46,0.06);
  transition: background 0.3s, box-shadow 0.3s;
}
.header.scrolled {
  background: rgba(250,248,243,0.95);
  box-shadow: var(--shadow);
}
.header-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem;
  width: 100%; display: flex; align-items: center; justify-content: space-between;
}
.logo img { height: 40px; width: auto; }
.nav-desktop { display: flex; align-items: center; gap: 2rem; }
.nav-desktop a {
  font-size: 0.9rem; font-weight: 500; color: var(--ink);
  opacity: 0.65; transition: opacity 0.2s, color 0.2s;
}
.nav-desktop a:hover, .nav-desktop a.active { opacity: 1; color: var(--purple); }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.8rem; font-weight: 600;
  padding: 0.35rem 0.7rem; border-radius: 999px;
  border: 1px solid rgba(15,11,46,0.12);
  color: var(--ink); opacity: 0.7;
  transition: opacity 0.2s;
}
.lang-switch:hover { opacity: 1; }
.btn-nav {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1.25rem; border-radius: 999px;
  background: var(--purple); color: var(--white);
  font-size: 0.85rem; font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}
.btn-nav:hover { background: var(--purple-dark); transform: translateY(-1px); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span {
  display: block; width: 22px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav overlay */
.nav-mobile {
  display: none; position: fixed; inset: 0; top: var(--header-h);
  background: var(--cream); z-index: 99;
  flex-direction: column; padding: 2rem 1.5rem;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.nav-mobile.open { display: flex; opacity: 1; pointer-events: auto; }
.nav-mobile a {
  font-size: 1.15rem; font-weight: 600; padding: 0.75rem 0;
  border-bottom: 1px solid rgba(15,11,46,0.06);
  display: block;
}
.nav-mobile a:hover { color: var(--purple); }
.nav-mobile .btn-nav { margin-top: 1.5rem; text-align: center; justify-content: center; }
.nav-mobile .lang-switch { margin-top: 1rem; align-self: flex-start; }

@media (max-width: 768px) {
  .nav-desktop, .nav-right .btn-nav, .nav-right .lang-switch { display: none; }
  .hamburger { display: flex; }
}
@media (min-width: 769px) {
  .nav-mobile { display: none !important; }
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.75rem; border-radius: 999px;
  font-size: 0.95rem; font-weight: 600;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--purple); color: var(--white);
}
.btn-primary:hover { background: var(--purple-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-secondary {
  background: var(--white); color: var(--ink);
  border: 1px solid rgba(15,11,46,0.12);
}
.btn-secondary:hover { border-color: var(--purple); color: var(--purple); transform: translateY(-2px); }
.btn-mint {
  background: var(--mint); color: var(--ink);
}
.btn-mint:hover { background: var(--mint-dark); transform: translateY(-2px); }
.btn-sm { padding: 0.5rem 1.15rem; font-size: 0.85rem; }
.btn-ghost {
  background: none; color: var(--purple); padding: 0.5rem 0;
  font-weight: 600; font-size: 0.9rem;
}
.btn-ghost:hover { opacity: 0.7; }

/* ========================================
   BADGES
   ======================================== */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.3rem 0.75rem; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-purple { background: rgba(91,79,214,0.12); color: var(--purple); }
.badge-mint { background: rgba(168,240,214,0.35); color: #1a6b47; }
.badge-amber { background: rgba(245,158,11,0.15); color: #92400e; }
.badge-outline {
  background: none; border: 1px solid rgba(15,11,46,0.12);
  color: rgba(15,11,46,0.55);
}

/* ========================================
   HERO
   ======================================== */
.hero {
  position: relative; overflow: hidden;
  padding: calc(var(--header-h) + 4rem) 0 5rem;
  min-height: 85vh; display: flex; align-items: center;
}
.hero-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 1rem; border-radius: 999px;
  background: rgba(91,79,214,0.08); color: var(--purple);
  font-size: 0.85rem; font-weight: 600; margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.1;
}
.hero-subtitle {
  margin-top: 1.25rem; font-size: 1.1rem; line-height: 1.7;
  color: rgba(15,11,46,0.6); max-width: 520px;
}
.hero-buttons { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-image { display: flex; justify-content: center; }
.hero-image img { width: 100%; max-width: 420px; drop-shadow: 0 32px 64px rgba(91,79,214,0.2); }
@media (max-width: 768px) {
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 2rem); padding-bottom: 3rem; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-subtitle { max-width: 100%; }
  .hero-buttons { justify-content: center; }
  .hero-image { order: -1; }
  .hero-image img { max-width: 240px; }
}

/* ========================================
   SECTION HEADINGS
   ======================================== */
.section-heading { text-align: center; margin-bottom: 3rem; }
.section-heading h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; letter-spacing: -0.02em; }
.section-heading p { margin-top: 0.75rem; font-size: 1.05rem; color: rgba(15,11,46,0.55); max-width: 560px; margin-left: auto; margin-right: auto; }

/* ========================================
   CARDS
   ======================================== */
.card {
  background: var(--white); border-radius: var(--radius-xl);
  border: 1px solid rgba(15,11,46,0.06);
  overflow: hidden; transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-body { padding: 1.5rem; }
.card-emoji { font-size: 2.5rem; margin-bottom: 0.75rem; }
.card-title { font-size: 1.1rem; font-weight: 700; }
.card-desc { margin-top: 0.5rem; font-size: 0.9rem; color: rgba(15,11,46,0.6); line-height: 1.6; }
.card-footer { padding: 0 1.5rem 1.5rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.card-gradient {
  height: 6px; width: 100%;
}

/* Grid layouts */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
}

/* Project card specific */
.project-card { display: flex; flex-direction: column; }
.project-card .card-body { flex: 1; display: flex; flex-direction: column; }
.project-card .card-desc { flex: 1; }
.project-card a { color: inherit; }

/* Gradient strips */
.grad-indigo { background: linear-gradient(to right, #6366f1, #9333ea); }
.grad-pink { background: linear-gradient(to right, #ec4899, #f97316); }
.grad-emerald { background: linear-gradient(to right, #10b981, #0d9488); }
.grad-amber { background: linear-gradient(to right, #f59e0b, #ef4444); }
.grad-lime { background: linear-gradient(to right, #84cc16, #10b981); }
.grad-sky { background: linear-gradient(to right, #0ea5e9, #2563eb); }

/* ========================================
   ABOUT PREVIEW (homepage)
   ======================================== */
.about-preview {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.about-preview img { border-radius: var(--radius-xl); max-width: 360px; }
.about-preview h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; }
.about-preview p { margin-top: 1rem; color: rgba(15,11,46,0.6); line-height: 1.7; }
@media (max-width: 768px) {
  .about-preview { grid-template-columns: 1fr; text-align: center; }
  .about-preview img { max-width: 200px; margin: 0 auto; }
}

/* ========================================
   CTA BANNER
   ======================================== */
.cta-banner {
  position: relative; overflow: hidden;
  background: var(--ink); color: var(--cream);
  border-radius: var(--radius-xl); padding: 4rem 2rem; text-align: center;
}
.cta-banner h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 800; position: relative; z-index: 1; }
.cta-banner p { margin-top: 0.75rem; opacity: 0.65; font-size: 1.05rem; position: relative; z-index: 1; max-width: 480px; margin-left: auto; margin-right: auto; }
.cta-banner .btn { position: relative; z-index: 1; margin-top: 2rem; }

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--sand); padding: 4rem 0 2rem;
  border-top: 1px solid rgba(15,11,46,0.06);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem;
}
.footer-logo img { height: 36px; margin-bottom: 1rem; }
.footer-tagline { color: rgba(15,11,46,0.5); font-size: 0.9rem; max-width: 300px; }
.footer h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(15,11,46,0.4); margin-bottom: 1rem; }
.footer-links a { display: block; font-size: 0.9rem; padding: 0.3rem 0; color: rgba(15,11,46,0.65); transition: color 0.2s; }
.footer-links a:hover { color: var(--purple); }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(15,11,46,0.08);
  text-align: center; font-size: 0.8rem; color: rgba(15,11,46,0.4);
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* Spacer for fixed header */
.header-spacer { height: var(--header-h); }

/* ========================================
   PAGE HEADER (inner pages)
   ======================================== */
.page-header {
  position: relative; overflow: hidden;
  padding: calc(var(--header-h) + 3rem) 0 3rem;
  text-align: center;
}
.page-header h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; letter-spacing: -0.02em; }
.page-header p { margin-top: 0.75rem; font-size: 1.05rem; color: rgba(15,11,46,0.55); max-width: 560px; margin-left: auto; margin-right: auto; }

/* ========================================
   ABOUT PAGE
   ======================================== */
.about-story {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.about-story img { border-radius: var(--radius-xl); max-width: 400px; width: 100%; }
@media (max-width: 768px) {
  .about-story { grid-template-columns: 1fr; }
  .about-story img { max-width: 250px; margin: 0 auto; }
}
.about-boxes {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
}
.about-box {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 2rem; border: 1px solid rgba(15,11,46,0.06);
}
.about-box h3 { font-size: 1rem; font-weight: 700; color: var(--purple); margin-bottom: 0.5rem; }
.about-box p { font-size: 0.9rem; color: rgba(15,11,46,0.6); line-height: 1.6; }
@media (max-width: 640px) { .about-boxes { grid-template-columns: 1fr; } }

.value-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 2rem; text-align: center;
  border: 1px solid rgba(15,11,46,0.06);
}
.value-card .value-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.value-card h3 { font-size: 1rem; font-weight: 700; }
.value-card p { margin-top: 0.5rem; font-size: 0.85rem; color: rgba(15,11,46,0.55); }

/* ========================================
   PROJECT DETAIL
   ======================================== */
.project-detail-header {
  padding: calc(var(--header-h) + 3rem) 0 2rem;
}
.project-back { font-size: 0.9rem; color: rgba(15,11,46,0.5); }
.project-back:hover { color: var(--purple); }
.project-detail-header h1 { margin-top: 1rem; font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }
.project-detail-header .tagline { margin-top: 0.5rem; font-size: 1.15rem; color: rgba(15,11,46,0.55); }
.project-info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 2rem;
}
.project-info-grid h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(15,11,46,0.4); margin-bottom: 0.5rem; }
.project-info-grid p, .project-info-grid li { font-size: 0.95rem; color: rgba(15,11,46,0.7); line-height: 1.7; }
.project-info-grid ul { padding-left: 1.25rem; }
.project-info-grid ul li { padding: 0.25rem 0; list-style: disc; }
@media (max-width: 768px) { .project-info-grid { grid-template-columns: 1fr; } }

/* ========================================
   BLOG CARD & DETAIL
   ======================================== */
.blog-card { display: flex; flex-direction: column; }
.blog-card .card-body { flex: 1; display: flex; flex-direction: column; }
.blog-card time { font-size: 0.75rem; font-weight: 600; color: rgba(15,11,46,0.45); }
.blog-card h3 { margin-top: 0.5rem; font-size: 1.05rem; font-weight: 700; }
.blog-card p { margin-top: 0.5rem; font-size: 0.875rem; color: rgba(15,11,46,0.55); line-height: 1.6; flex: 1; }
.blog-card .read-more { margin-top: 1rem; font-size: 0.875rem; font-weight: 600; color: var(--purple); }

/* Blog detail article */
.article { max-width: 720px; margin: 0 auto; padding: 0 1.25rem; }
.article-header { padding-top: calc(var(--header-h) + 2rem); }
.article-header h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; letter-spacing: -0.02em; margin-top: 0.75rem; line-height: 1.15; }
.article-header .excerpt { margin-top: 1rem; font-size: 1.1rem; color: rgba(15,11,46,0.6); line-height: 1.7; }
.article-content { margin-top: 3rem; }
.article-content h2 { font-size: 1.5rem; font-weight: 700; margin-top: 2.5rem; margin-bottom: 0.75rem; }
.article-content h3 { font-size: 1.2rem; font-weight: 700; margin-top: 2rem; margin-bottom: 0.5rem; }
.article-content p { font-size: 1rem; line-height: 1.8; color: rgba(15,11,46,0.75); margin-bottom: 1.25rem; }
.article-content ul, .article-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.article-content li { font-size: 1rem; line-height: 1.8; color: rgba(15,11,46,0.75); padding: 0.15rem 0; list-style: disc; }
.article-content a { color: var(--purple); text-decoration: underline; }

/* ========================================
   CONTACT PAGE
   ======================================== */
.contact-card {
  background: var(--white); border-radius: var(--radius-xl);
  padding: 3rem; text-align: center; max-width: 520px; margin: 0 auto;
  border: 1px solid rgba(15,11,46,0.06); box-shadow: var(--shadow);
}
.contact-card h2 { font-size: 1.25rem; font-weight: 700; }
.contact-card p { margin-top: 0.5rem; font-size: 0.9rem; color: rgba(15,11,46,0.5); }
.contact-email {
  margin-top: 1.5rem; font-size: 1.35rem; font-weight: 700; color: var(--purple);
  display: block;
}
.contact-actions { margin-top: 1.5rem; display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.copy-btn {
  padding: 0.6rem 1.25rem; border-radius: 999px;
  background: var(--sand); color: var(--ink);
  font-size: 0.85rem; font-weight: 600;
  transition: background 0.2s;
}
.copy-btn:hover { background: var(--mint); }
.copy-btn.copied { background: var(--mint); }

/* Social links */
.social-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.social-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.2rem; border-radius: 999px;
  background: var(--white); border: 1px solid rgba(15,11,46,0.08);
  font-size: 0.85rem; font-weight: 500; color: rgba(15,11,46,0.6);
  transition: all 0.2s;
}
.social-link:hover { border-color: var(--purple); color: var(--purple); transform: translateY(-2px); }

/* ========================================
   APPS PAGE
   ======================================== */
.app-card {
  background: var(--white); border-radius: var(--radius-xl);
  padding: 2rem; border: 1px solid rgba(15,11,46,0.06);
  display: flex; flex-direction: column;
}
.app-card .card-emoji { font-size: 2.5rem; }
.app-card h3 { font-size: 1.1rem; font-weight: 700; margin-top: 0.75rem; }
.app-card .card-desc { flex: 1; }
.app-buttons { margin-top: 1.25rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
  background: var(--white); border: 2px dashed rgba(15,11,46,0.12);
  border-radius: var(--radius-xl); padding: 4rem 2rem; text-align: center;
  color: rgba(15,11,46,0.45); font-size: 1rem;
}
