/* ============================================
   MALINOVSKI.COM — Main Stylesheet
   Palette: Cream #F5F2ED / Charcoal #1A1A1A
   Fonts: Playfair Display (headings) / Inter (body)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400&display=swap');

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  background-color: #F5F2ED;
  color: #1A1A1A;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  line-height: 1.05;
}

h1 { font-size: clamp(48px, 6vw, 80px); }
h2 { font-size: clamp(36px, 4vw, 56px); }
h3 { font-size: clamp(24px, 2.5vw, 32px); }

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #C9B99A;
}

.body-text {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.85;
  color: #6B6460;
  max-width: 460px;
}

/* ---------- Navigation ---------- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: #F5F2ED;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, transform 0.4s ease;
}
nav.nav-hidden { transform: translateY(-100%); }
nav.menu-open { z-index: 103; }

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav.scrolled { border-color: #E8E2D9; }

.nav-logo {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #6B6460;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active { color: #1A1A1A; }

/* ---------- Buttons & Links ---------- */
.link-underline {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #1A1A1A;
  border-bottom: 1px solid #C9B99A;
  padding-bottom: 2px;
  display: inline-block;
  transition: border-color 0.2s ease;
}
.link-underline:hover { border-color: #1A1A1A; }

.btn {
  display: inline-block;
  padding: 14px 36px;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: #1A1A1A;
  color: #F5F2ED;
  border: 1px solid #1A1A1A;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: transparent; color: #1A1A1A; }

/* ---------- Layout ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 60px;
}

.page-section {
  padding: 120px 0;
}

.divider {
  width: 100%;
  height: 1px;
  background: #E8E2D9;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 60px 80px;
}

.hero-eyebrow { margin-bottom: 24px; }

.hero h1 { max-width: 700px; }

.hero h1 em {
  font-style: italic;
  color: #1A1A1A;
}

.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #E8E2D9;
}

.hero-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: #6B6460;
}

/* ---------- Photo Grid ---------- */
.photo-grid {
  display: grid;
  gap: 4px;
}

.photo-grid-2 { grid-template-columns: 1fr 1fr; }
.photo-grid-3 { grid-template-columns: 2fr 1fr 1fr; }

.photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-tall { aspect-ratio: 3/4; }
.photo-wide { aspect-ratio: 16/9; }
.photo-square { aspect-ratio: 1/1; }

/* ---------- Text + Image Block ---------- */
.text-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.text-image.reverse { direction: rtl; }
.text-image.reverse > * { direction: ltr; }

/* ---------- Form ---------- */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.form-field label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6B6460;
}

.form-field input,
.form-field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid #C9B99A;
  padding: 10px 0;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: #1A1A1A;
  outline: none;
  transition: border-color 0.2s ease;
  width: 100%;
}

.form-field input:focus,
.form-field textarea:focus { border-color: #1A1A1A; }

.form-field textarea { resize: none; min-height: 120px; }

/* ---------- Footer ---------- */
footer {
  padding: 48px 60px;
  border-top: 1px solid #E8E2D9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer .footer-logo {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

footer .footer-note {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: #6B6460;
}

/* ---------- Burger ---------- */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 102;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 1px;
  background: #1A1A1A;
  transition: transform 0.35s ease, opacity 0.25s ease;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Mobile overlay menu ---------- */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: #F5F2ED;
  z-index: 101;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav-mobile.open {
  display: flex;
  opacity: 1;
}
.nav-mobile a {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #6B6460;
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-mobile a:hover,
.nav-mobile a.active { color: #1A1A1A; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav-inner { padding: 20px 24px; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .hero-inner { padding: 0 24px 32px; }
  .container { padding: 0 24px !important; }
  .page-section { padding: 80px 0; }
  .text-image { grid-template-columns: 1fr; gap: 40px; }
  .photo-grid-3 { grid-template-columns: 1fr 1fr; }
  footer { flex-direction: column; gap: 16px; text-align: center; padding: 40px 24px; }
  .footer-inner { padding: 0 24px !important; flex-direction: column; gap: 12px; text-align: center; }

  h1 { font-size: clamp(32px, 9vw, 48px); }
  h2 { font-size: clamp(28px, 7vw, 40px); }

  .hero-bottom { flex-direction: column; align-items: flex-start; gap: 20px; }
  .intro-section { padding: 100px 0 60px !important; }
  .hero-bottom .link-underline { white-space: nowrap; }

  /* index.html intro: фото под текст */
  .intro-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  .intro-grid > div:last-child {
    order: -1;
    padding-top: 0 !important;
  }
  .intro-grid > div:last-child img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    aspect-ratio: auto !important;
  }

  /* index.html services: в колонку */
  .services-grid {
    grid-template-columns: 1fr !important;
    gap: 48px !important;
  }
}
