/* ─────────────────────────────────────────
   CSS Variables — Light / Dark Theme
───────────────────────────────────────── */
:root {
  --color-bg: #ffffff;
  --color-card-bg: rgba(0, 0, 0, 0.05);
  --color-text: #1d1b20;
  --toggle-track-bg: #1d1b20;
}

[data-theme="dark"] {
  --color-bg: #1d1b20;
  --color-card-bg: rgba(255, 255, 255, 0.05);
  --color-text: #ffffff;
  --toggle-track-bg: #ffffff;
}

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

html {
  height: 100%;
}

body {
  height: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: 'Manrope', sans-serif;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* ─────────────────────────────────────────
   Header
───────────────────────────────────────── */
.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 62px 126px 0;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────
   Logo
───────────────────────────────────────── */
.logo-img {
  display: block;
  width: 165px;
  height: 54px;
  flex-shrink: 0;
}

/* Theme-based logo visibility */
[data-theme="light"] .logo-for-dark { display: none; }
[data-theme="dark"]  .logo-for-light { display: none; }

/* ─────────────────────────────────────────
   Theme Toggle
───────────────────────────────────────── */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.toggle-track {
  width: 63px;
  height: 31px;
  border-radius: 15.5px;
  background: var(--toggle-track-bg);
  position: relative;
  transition: background 0.3s ease;
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px; /* updated by JS */
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url('assets/toggle-circle-light.svg');
  display: flex;
  align-items: center;
  justify-content: center;
  transition: left 0.2s ease;
}

.toggle-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Toggle icon visibility */
[data-theme="light"] .toggle-moon { display: none; }
[data-theme="dark"]  .toggle-sun  { display: none; }

/* ─────────────────────────────────────────
   Main Area
───────────────────────────────────────── */
main {
  flex: 1;
  min-height: 0;
  display: flex;
  padding: 62px 74px 0;
}

/* ─────────────────────────────────────────
   Card
───────────────────────────────────────── */
.card {
  flex: 1;
  min-width: 0;  /* prevents flex item from overflowing its container */
  min-height: calc(100vh - 178px);
  background: var(--color-card-bg);
  border-radius: 59px 59px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 72px 60px 20px;
    height: fit-content;
}

/* Inner wrapper — vertically centers hero + social + phone */
.card-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-top: 128px;
}

/* ─────────────────────────────────────────
   Hero Text
───────────────────────────────────────── */
.hero-text {
  font-size: 36px;
  font-weight: 700;
  line-height: 46px;
  text-align: center;
  max-width: 874px;
  width: 100%;
  color: var(--color-text);
  overflow-wrap: break-word;
}

.card-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 88px;
  width: 100%;
  margin-top: 108px;
}

/* ─────────────────────────────────────────
   Social Section
───────────────────────────────────────── */
.social {
  display: flex;
  align-items: center;
  min-height: 48px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.social-link:hover {
  opacity: 0.7;
}

.social-link + .social-link {
  margin-left: 18px;
}

.social-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Social icon theme visibility */
[data-theme="light"] .icon-for-dark { display: none; }
[data-theme="dark"]  .icon-for-light { display: none; }

.social-label {
  font-size: 18px;
  font-weight: 400;
  line-height: 22px;
  color: var(--color-text);
  margin-left: 38px;
}

/* ─────────────────────────────────────────
   Phone Block
───────────────────────────────────────── */
.phone-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 0;
}

.phone-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #67ce67;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.phone-btn:hover {
  opacity: 0.85;
}

.phone-btn img {
  width: 47px;
  height: 47px;
  object-fit: contain;
}

.phone-number {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.16px;
  text-align: center;
  color: var(--color-text);
  white-space: nowrap;
}

/* ─────────────────────────────────────────
   Footer (inside card)
───────────────────────────────────────── */
.footer {
  margin-top: auto;
  padding-top: 76px;
}

.copyright {
  font-size: 12px;
  font-weight: 400;
  line-height: 14px;
  text-align: center;
  color: var(--color-text);
  white-space: nowrap;
}

/* ─────────────────────────────────────────
   Mobile — max-width: 1023px
───────────────────────────────────────── */
@media (max-width: 1023px) {
  .header {
    padding: 36px 36px 0;
  }

  .logo-img {
    width: 119px;
    height: 39px;
  }

  main {
    padding: 32px 19px 0;
    min-height: 0;
  }

  .card {
    min-height: calc(100vh - 107px);
    border-radius: 31px 31px 0 0;
    padding: 44px 20px 20px;
    overflow: hidden;
  }

  .card-main {
    flex: 1;
    justify-content: space-between;
    max-width: 100%;
    padding-top: 170px;
    padding-bottom: 0;
  }

  .hero-text {
    font-size: 14px;
    line-height: normal;
    max-width: 280px;
  }

  .card-bottom {
    gap: 42px;
    padding-bottom: 14px;
    margin-top: 0;
  }

  .social {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .social-link + .social-link {
    margin-left: 0;
  }

  .social-link {
    width: 36px;
    height: 36px;
  }

  .social-label {
    font-size: 12px;
    line-height: 14px;
    margin-left: 12px;
  }

  .phone-btn {
    width: 74px;
    height: 74px;
  }

  .phone-btn img {
    width: 36px;
    height: 36px;
  }

  .phone-number {
    font-size: 12px;
  }

  .footer {
    margin-top: 0;
  }

  .copyright {
    font-size: 10px;
  }
}
