/* Premium Design System — brand overrides */
:root {
  --primary: #18181b;
  --secondary: #a855f7;
  --primary-light: color-mix(in srgb, #18181b 75%, var(--text-on-primary));
  --accent: #a855f7;
  --accent-soft: color-mix(in srgb, #18181b 8%, var(--bg-secondary));
  --border: var(--border-color);
  /* Legacy aliases */
  --ink: var(--text-main);
  --muted: var(--text-muted);
  --bg: var(--bg-main);
  --surface: var(--bg-secondary);
  --border: var(--border-color);
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* .container defined in premium-design-system.css */

/* Header */
header {
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 247, 0.92);
  backdrop-filter: blur(10px);
}

.logo {
  
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.logo span { color: var(--accent); }

nav a {
  margin-left: 28px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

nav a:hover { color: var(--text-main); }
nav a.active { color: var(--accent); font-weight: 600; }

.nav-toggle {
  display: none;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-main);
}

header { position: relative; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.theme-toggle {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--text-main);
  transition: border-color 0.2s, background 0.2s;
}

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

/* Hero */
.hero {
  padding: 72px 0 56px;
}

.hero h1 {
  margin: 0 0 18px;
  
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.12;
  font-weight: 700;
  color: var(--text-main);
  max-width: 640px;
}

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

.hero p {
  margin: 0 0 36px;
  max-width: 520px;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.tags { display: flex; gap: 10px; flex-wrap: wrap; }

.tag {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-muted);
  transition: all 0.2s;
}

.filter-tag { cursor: pointer;  }
.filter-tag:hover { border-color: var(--accent); color: var(--text-main); }
.filter-tag.active {
  background: var(--text-main);
  color: var(--bg-secondary);
  border-color: var(--text-main);
}

/* Sections */
section { padding: 64px 0; }

.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}

section h2 {
  margin: 0 0 36px;
  
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 700;
  color: var(--text-main);
}

.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { margin: 0 0 10px; }
.section-head p { margin: 0; color: var(--text-muted); }

/* Portfolio gallery */
.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.project {
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  padding: 0;
  width: 100%;
  
  color: var(--text-main);
  transition: transform 0.25s ease;
}

.project:hover { transform: translateY(-6px); }

.project-card {
  background: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: none;
  transition: box-shadow 0.25s ease, border-color 0.25s;
}

.project:hover .project-card {
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-soft);
}

.project-thumb {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project:hover .project-thumb img { transform: scale(1.04); }

.project-cat {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(28, 25, 23, 0.72);
  color: var(--text-on-primary);
  backdrop-filter: blur(4px);
}

.project-body { padding: 22px 24px 26px; }

.project-body h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.project-body p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-grid p { color: var(--text-muted); font-size: 1.02rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.stat {
  text-align: center;
  padding: 20px 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.stat strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  
}

.stat span { font-size: 0.8rem; color: var(--text-muted); }

.about-img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  aspect-ratio: 5 / 4;
  box-shadow: none;
}

.team-row {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin-top: 56px;
  flex-wrap: wrap;
}

.team-member { text-align: center; }

.team-member img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
  border: 3px solid var(--bg-secondary);
  box-shadow: 0 2px 12px rgba(28, 25, 23, 0.1);
}

.team-member span { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

/* Contact */
.contact {
  text-align: center;
  padding: 80px 0;
  background: var(--surface-alt);
  border-radius: 8px;
  margin-bottom: 32px;
}

.contact h2 { margin: 0 0 12px; }
.contact > p { color: var(--text-muted); margin: 0 0 32px; font-size: 1.05rem; }

.contact-form {
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-form input,
.contact-form textarea {
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #a8a29e; }

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  background: var(--text-main);
  color: var(--bg-secondary);
  font-weight: 700;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover { background: var(--accent); color: var(--text-main); }

.btn-primary { background: var(--accent); color: var(--text-on-primary); }
.btn-primary:hover { background: var(--accent-hover); color: var(--text-on-primary); }

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.75);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal.open { display: flex; }

.modal-content {
  background: var(--bg-secondary);
  border-radius: 8px;
  max-width: 580px;
  width: 100%;
  padding: 28px;
  position: relative;
  color: var(--text-main);
  box-shadow: var(--shadow-hover);
}

.modal-content img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
}

.modal-content h3 {
  margin: 0 0 8px;
  
  font-size: 1.25rem;
}

.modal-content p { margin: 0; color: var(--text-muted); }

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: var(--surface-alt);
  border: none;
  color: var(--text-main);
  font-size: 22px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  line-height: 1;
}

/* Footer */
footer {
  padding: 32px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text-main);
  color: var(--bg-secondary);
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 101;
  font-size: 0.9rem;
  font-weight: 500;
}

.toast.show { opacity: 1; }

/* Page navigation */
.page { display: none; }
.page.active { display: block; }

/* Supplementary sections */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  padding: 56px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.stat-counter {
  padding: 20px 12px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.stat-counter .num {
  font-size: 2rem;
  font-weight: 800;
  display: block;
  color: var(--text-main);
  
}

.stat-counter .lbl { font-size: 0.85rem; color: var(--text-muted); }

.why-choose { padding: 56px 0; background: var(--surface-alt); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.why-card {
  text-align: center;
  padding: 28px 20px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.why-card .icon { font-size: 1.8rem; margin-bottom: 12px; }
.why-card strong { display: block; margin-bottom: 8px; color: var(--text-main); }
.why-card p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

.testimonials { padding: 56px 0; }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.testimonial-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 26px;
  color: var(--text-main);
}

.testimonial-card p { margin: 0 0 4px; color: var(--text-main); line-height: 1.6; }
.testimonial-card .stars { color: #d97706; margin-bottom: 12px; letter-spacing: -0.01em; }

.testimonial-card .author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.testimonial-card .author img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-card .author strong { color: var(--text-main); }
.testimonial-card .author .role { color: var(--text-muted); font-size: 0.85rem; }

.faq-section { padding: 56px 0; background: var(--surface-alt); }

.faq-list { max-width: 720px; margin: 0 auto; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  color: var(--text-main);
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.2rem; color: var(--text-muted); }
.faq-item[open] summary::after { content: '−'; }
.faq-item .answer { padding: 0 20px 16px; color: var(--text-muted); font-size: 0.95rem; }

.cta-banner {
  background: linear-gradient(135deg, var(--text-main) 0%, #3d3832 100%);
  color: #faf9f7;
  padding: 48px 24px;
  text-align: center;
}

.cta-banner h2 { color: #faf9f7; margin: 0 0 10px; }
.cta-banner p { margin: 0 0 24px; color: rgba(250, 249, 247, 0.8); }

.newsletter-cta {
  background: var(--accent-soft);
  color: var(--text-main);
  padding: 48px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.newsletter-cta h2 { margin: 0 0 8px; }
.newsletter-cta p { margin: 0 0 20px; color: var(--text-muted); }

.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.newsletter-form input {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-main);
  
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  padding: 32px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.animate-in { animation: fadeUp 0.5s ease both; }

/* Dark mode */


body.dark-mode header {
  background: rgba(18, 17, 16, 0.92);
  border-color: var(--border);
}

body.dark-mode .filter-tag.active {
  background: var(--accent);
  color: var(--text-main);
  border-color: var(--accent);
}

body.dark-mode .contact-form input::placeholder,
body.dark-mode .contact-form textarea::placeholder { color: #78716c; }

body.dark-mode .theme-toggle {
  background: var(--bg-secondary);
  border-color: var(--border);
  color: var(--text-main);
}

body.dark-mode footer { background: #0c0b0a; }

@media (max-width: 700px) {
  .projects, .about-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    background: var(--bg-secondary);
    padding: 16px;
    border-bottom: 1px solid var(--border);
    z-index: 60;
  }
  nav.open { display: flex; }
  nav a { margin: 8px 0 0; }
  .hero { padding: 48px 0 40px; }
  .project-thumb { height: 200px; }
  .stats { grid-template-columns: 1fr; }
}

.home-extras.hidden { display: none !important; }
