/* Ключи Питера — общие стили (базовый шаблон) */
:root {
  --primary: #C9A24D;
  --accent: #E0B77A;
  --bg: #7A6F63;
  --dark: #3F3A34;
  --text: #EFE3C8;
  --green: #6F8F72;
  --radius: 32px;
  --shadow: 8px 8px 0px rgba(0,0,0,0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ================= HERO HEADER ================= */
.hero-header {
  background: var(--bg);
  padding: clamp(40px, 6vw, 60px) 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-inner {
  max-width: 1200px;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 48px;
}

.hero-logo {
  max-width: 400px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  border: 3px solid var(--primary);
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  align-self: stretch;
}

.hero-card {
  flex: 1;
  text-align: left;
}

.hero-card h1 {
  font-size: clamp(36px, 5vw, 56px);
  margin-bottom: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: lowercase;
  color: var(--primary);
}

.hero-card .logo-accent {
  color: var(--primary);
}

.hero-card .subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text);
  font-weight: 400;
  line-height: 1.7;
  margin-top: 16px;
}

/* ================= SECTIONS ================= */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(40px, 5vw, 60px) 20px;
}

.section-title {
  font-size: clamp(32px, 4vw, 48px);
  margin-bottom: 32px;
  text-transform: lowercase;
  font-weight: 700;
  color: var(--text);
}

/* ================= ADVANTAGES BLOCK ================= */
.advantages-section {
  margin-bottom: 0;
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.advantage-card {
  background: linear-gradient(180deg, var(--dark), #2a241f);
  border: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: clamp(32px, 4vw, 40px);
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
  will-change: transform;
}

.advantage-card:hover {
  transform: translate(6px, 6px);
  box-shadow: 4px 4px 0px rgba(0,0,0,0.3);
}

.advantage-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  flex-shrink: 0;
  border: 3px solid var(--dark);
  box-shadow: 4px 4px 0px rgba(0,0,0,0.2);
}

.advantage-content {
  flex: 1;
}

.advantage-content p {
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 8px;
}

.advantage-content p:last-child {
  margin-bottom: 0;
}

.advantage-content p strong {
  color: var(--primary);
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
  font-size: clamp(18px, 2.2vw, 20px);
}

/* ================= CARDS ================= */
.card {
  background: linear-gradient(180deg, var(--dark), #2a241f);
  border: 3px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(32px, 4vw, 48px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
  transform-style: preserve-3d;
  cursor: pointer;
}

.card:hover {
  transform: translate(6px, 6px);
  box-shadow: 4px 4px 0px rgba(0,0,0,0.3);
}

.card h3 {
  font-size: clamp(24px, 3vw, 32px);
  margin-bottom: 20px;
  color: var(--primary);
  text-transform: lowercase;
  font-weight: 600;
  line-height: 1.3;
}

.card h3 .sub-key {
  display: block;
  font-size: clamp(18px, 2.2vw, 22px);
  margin-top: 4px;
  font-weight: 500;
}

.card p {
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.8;
  color: var(--text);
}

.card a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
}

.card a:hover {
  text-decoration: none;
}

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

/* ================= CONTACTS ================= */
.contacts {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--dark);
  border: 3px solid var(--dark);
  text-align: center;
}

.contacts .section-title {
  color: var(--dark);
  margin-bottom: 24px;
}

.contacts-intro {
  font-size: clamp(16px, 2vw, 18px);
  margin-bottom: 16px;
  color: var(--dark);
  line-height: 1.6;
}

.contacts-phone {
  font-size: clamp(18px, 2.5vw, 22px);
  margin-bottom: 32px;
  color: var(--dark);
  font-weight: 600;
}

.contacts-phone a {
  color: var(--dark);
  text-decoration: none;
  border-bottom: 2px dotted var(--dark);
  transition: border-color 0.3s ease;
}

.contacts-phone a:hover {
  border-bottom-color: transparent;
}

.contact-form-wrapper {
  background: rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 24px;
  backdrop-filter: blur(10px);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--dark);
  font-weight: 500;
  text-align: left;
}

.form-group input {
  padding: 14px 16px;
  border: 2px solid var(--dark);
  border-radius: calc(var(--radius) / 2);
  font-size: clamp(16px, 2vw, 18px);
  font-family: inherit;
  background: #fff;
  color: var(--dark);
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(201, 162, 77, 0.2);
}

.form-group input::placeholder {
  color: rgba(63, 58, 52, 0.5);
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 8px;
  text-align: left;
}

.form-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.form-checkbox label {
  font-size: clamp(13px, 1.5vw, 14px);
  line-height: 1.5;
  cursor: pointer;
  margin: 0;
}

.form-checkbox a {
  color: var(--dark);
  text-decoration: underline;
  font-weight: 600;
}

.form-checkbox a:hover {
  text-decoration: none;
}

.submit-btn {
  padding: 16px 32px;
  background: var(--dark);
  color: var(--primary);
  border: 3px solid var(--dark);
  border-radius: calc(var(--radius) / 2);
  font-size: clamp(16px, 2vw, 18px);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  text-transform: lowercase;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.2);
  margin-top: 8px;
}

.submit-btn:hover:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px rgba(0,0,0,0.2);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-message {
  margin-top: 16px;
  padding: 12px;
  border-radius: calc(var(--radius) / 2);
  font-size: 14px;
  text-align: center;
  display: none;
}

.form-message.success {
  background: rgba(111, 143, 114, 0.3);
  color: var(--dark);
  display: block;
}

.form-message.error {
  background: rgba(200, 50, 50, 0.3);
  color: var(--dark);
  display: block;
}

/* ================= COOKIE BANNER ================= */
.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  background: rgba(42, 36, 31, 0.95);
  border: 2px solid var(--primary);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  padding: 14px 16px;
  display: none;
  align-items: center;
  gap: 14px;
}

.cookie-banner.is-visible {
  display: flex;
}

.cookie-banner__text {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  flex: 1;
}

.cookie-banner__text a {
  color: var(--primary);
  font-weight: 600;
}

.cookie-banner__btn {
  flex-shrink: 0;
  background: var(--primary);
  color: var(--dark);
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.cookie-banner__btn:hover {
  filter: brightness(1.06);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 968px) {
  .hero-inner {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  .hero-card {
    text-align: center;
  }

  .hero-logo {
    max-width: 300px;
    height: auto;
    align-self: center;
  }

  .hero-card h1 {
    white-space: normal;
  }

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

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form-wrapper {
    padding: 24px;
  }

  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner__btn {
    width: 100%;
  }
}

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

  .hero-header {
    padding: 30px 16px;
  }

  .hero-inner {
    gap: 24px;
  }

  .hero-logo {
    max-width: 250px;
  }

  .hero-card,
  .card,
  .advantage-card {
    padding: 32px 24px;
  }

  .advantage-number {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
}

/* Отключение наклона на мобильных */
@media (hover: none) and (pointer: coarse) {
  .card,
  .hero-card,
  .advantage-card {
    transform: none !important;
  }
}

/* ================= СТРАНИЦА ПОЛИТИКИ (privacy) ================= */
body.page-privacy,
body.page-sale,
body.page-buy {
  padding: 40px 20px;
}

.page-container {
  max-width: 900px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--dark), #2a241f);
  border: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: clamp(40px, 5vw, 60px);
  box-shadow: var(--shadow);
}

.page-container h1 {
  font-size: clamp(32px, 4vw, 42px);
  margin-bottom: 32px;
  color: var(--primary);
  text-transform: lowercase;
  font-weight: 700;
}

.page-container h2 {
  font-size: clamp(24px, 3vw, 28px);
  margin-top: 32px;
  margin-bottom: 16px;
  color: var(--accent);
  text-transform: lowercase;
  font-weight: 600;
}

.page-container p {
  font-size: clamp(16px, 2vw, 18px);
  margin-bottom: 16px;
  line-height: 1.8;
}

.page-container ul {
  margin-left: 24px;
  margin-bottom: 16px;
}

.page-container li {
  font-size: clamp(16px, 2vw, 18px);
  margin-bottom: 8px;
  line-height: 1.7;
}

.back-link {
  display: inline-block;
  margin-bottom: 32px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(16px, 2vw, 18px);
  border-bottom: 2px solid var(--primary);
  transition: border-color 0.3s ease;
}

.back-link:hover {
  border-bottom-color: transparent;
}

.contact-info {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 2px solid var(--primary);
}

.contact-info p {
  margin-bottom: 8px;
}

.contact-info a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid var(--primary);
  transition: border-color 0.3s ease;
}

.contact-info a:hover {
  border-bottom-color: transparent;
}

@media (max-width: 640px) {
  body.page-privacy,
  body.page-sale,
  body.page-buy {
    padding: 20px 16px;
  }
  .page-container {
    padding: 32px 24px;
  }
}
