/* ============================================================
   MX Holdings OÜ — mxh.finance
   Premium minimal dark theme with glass-morphism
   ============================================================ */

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

:root {
  --bg-primary: #0d0d0d;
  --bg-secondary: #0f1724;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-border: rgba(255, 255, 255, 0.08);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --accent: #c9a84c;
  --accent-glow: rgba(201, 168, 76, 0.3);
  --text-primary: #f0f0f0;
  --text-muted: #8a8a9a;
  --font-heading: 'DM Serif Display', serif;
  --font-body: 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* --- Container --- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Glass Card --- */
.glass-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: #0d0d0d;
}

.btn-primary:hover {
  box-shadow: 0 0 24px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--surface-border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-outline.active {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ============================================================
   Header
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: background 0.3s ease, padding 0.3s ease;
}

.header.scrolled {
  background: rgba(13, 13, 13, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 0;
  border-bottom: 1px solid var(--surface-border);
}

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

.logo-link {
  display: flex;
  align-items: center;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
  font-weight: 400;
}

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

.nav-links .btn {
  font-size: 0.8rem;
  padding: 8px 20px;
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.hero-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(201, 168, 76, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(15, 23, 36, 0.8) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 80% 80%, rgba(15, 23, 36, 0.6) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

/* ============================================================
   Sections
   ============================================================ */
.section {
  padding: 100px 0;
}

.section-dark {
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--text-primary);
}

/* --- About Grid --- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.about-card {
  padding: 40px 32px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.about-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 168, 76, 0.2);
}

.about-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(201, 168, 76, 0.1);
  color: var(--accent);
  margin-bottom: 24px;
}

.about-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.about-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Approach Grid --- */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.approach-item {
  text-align: center;
}

.approach-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--accent);
  opacity: 0.3;
  margin-bottom: 16px;
}

.approach-item h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.approach-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Portfolio --- */
.portfolio-showcase {
  max-width: 700px;
  margin: 0 auto;
}

.portfolio-card {
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.portfolio-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.2);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 28px;
}

.portfolio-name {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 4px;
}

.portfolio-tagline {
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 20px;
  font-weight: 400;
}

.portfolio-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.portfolio-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.meta-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--surface-border);
  padding: 4px 12px;
  border-radius: 100px;
}

.portfolio-link svg {
  transition: transform 0.2s ease;
}

.portfolio-link:hover svg {
  transform: translate(2px, -2px);
}

/* --- CTA --- */
.section-cta {
  text-align: center;
  background:
    radial-gradient(ellipse 60% 60% at 50% 100%, rgba(201, 168, 76, 0.06) 0%, transparent 60%),
    var(--bg-primary);
}

.cta-inner {
  max-width: 560px;
  margin: 0 auto;
}

.cta-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 16px;
}

.cta-text {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.7;
}

/* ============================================================
   Contact Page
   ============================================================ */
.contact-section {
  padding-top: 160px;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-description {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact-detail svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* Form */
.contact-form-wrapper {
  padding: 40px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(138, 138, 154, 0.5);
}

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

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #e74c3c;
}

.form-success {
  text-align: center;
  padding: 40px 0;
  color: var(--accent);
  font-size: 1.1rem;
}

/* ============================================================
   404 Page
   ============================================================ */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-code {
  font-family: var(--font-heading);
  font-size: 8rem;
  color: var(--accent);
  opacity: 0.2;
  line-height: 1;
  margin-bottom: 8px;
}

.error-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 12px;
}

.error-text {
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--surface-border);
}

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

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-primary);
}

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

/* ============================================================
   Scroll Reveal Animation
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1200px) {
  .container {
    max-width: 960px;
  }
}

@media (max-width: 960px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }

  .approach-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 72px 0;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(13, 13, 13, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    padding: 40px;
    transition: right 0.3s ease;
    border-left: 1px solid var(--surface-border);
  }

  .nav-links.menu-open {
    right: 0;
  }

  .nav-links .btn {
    width: 100%;
    justify-content: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-card {
    padding: 32px 24px;
  }

  .hero {
    min-height: 90vh;
    padding: 100px 24px 60px;
  }

  .contact-section {
    padding-top: 120px;
  }

  .contact-form-wrapper {
    padding: 28px 20px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
