/* ─────────────────────────────────────────
   lowkey — styles.css
───────────────────────────────────────── */

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

:root {
  --bg:           #111113;
  --surface:      #18181c;
  --surface-2:    #1e1e24;
  --border:       rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.13);
  --text-primary: #f0f0f2;
  --text-muted:   #6b6b7a;
  --text-soft:    #9898a8;
  --accent:       #ffffff;
  --accent-glow:  rgba(255,255,255,0.10);
  --accent-soft:  rgba(255,255,255,0.06);
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --transition:   0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Layout ── */
header, footer {
  position: relative;
  z-index: 1;
}

main {
  position: relative;
  z-index: 2;
}

header {
  padding: 52px 5% 32px;
  max-width: 960px;
  margin: 0 auto;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 5% 80px;
}

footer {
  text-align: center;
  padding: 32px 5%;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.02em;
  border-top: 1px solid var(--border);
}

/* ── Logo ── */
.logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.logo-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background 0.6s ease;
  flex-shrink: 0;
}

.tagline {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  padding-left: 17px;
}

/* ── Selector Section ── */
.selector-section {
  margin-bottom: 44px;
}

.select-label {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ── Custom Select ── */
.custom-select {
  position: relative;
  user-select: none;
  max-width: 420px;
}

.select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.select-trigger:hover {
  border-color: var(--border-hover);
  background: var(--surface-2);
}

.custom-select.open .select-trigger {
  border-color: var(--accent);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.trigger-text {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-soft);
  transition: color var(--transition);
}

.custom-select.open .trigger-text,
.custom-select.has-value .trigger-text {
  color: var(--text-primary);
}

.trigger-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--transition), color var(--transition);
}

.trigger-icon svg {
  width: 100%;
  height: 100%;
}

.custom-select.open .trigger-icon {
  transform: rotate(180deg);
  color: var(--accent);
}

/* ── Dropdown Panel ── */
.select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.2s ease;
}

.custom-select.open .select-dropdown {
  max-height: 400px;
  opacity: 1;
  pointer-events: all;
}

.dropdown-inner {
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  overflow-y: auto;
  max-height: 380px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-hover) transparent;
}

.dropdown-inner::-webkit-scrollbar { width: 4px; }
.dropdown-inner::-webkit-scrollbar-track { background: transparent; }
.dropdown-inner::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 4px; }

/* ── Dropdown Item ── */
.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.dropdown-item:hover,
.dropdown-item:active {
  background: var(--accent-soft);
}

.item-logo {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  pointer-events: none;
}

.item-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

/* ── Plans Section ── */
.plans-section {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.plans-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Plans Header ── */
.plans-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}

.service-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 10px;
  background: color-mix(in srgb, var(--svc-color) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--svc-color) 18%, transparent);
  border-radius: 50px;
}

.badge-logo {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.badge-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.badge-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}

.plans-count {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ── Plans Grid ── */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

/* ── Plan Card ── */
.plan-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: cardIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}

.plan-card:hover {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  transform: translateY(-2px);
  background: var(--surface-2);
}

.plan-card.popular {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 3%, var(--surface));
}

.plan-card.popular:hover {
  border-color: var(--accent);
}

/* ── Popular Tag ── */
.popular-tag {
  position: absolute;
  top: -1px;
  right: 20px;
  padding: 4px 11px;
  background: var(--accent);
  color: #000;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 0 0 8px 8px;
}

/* ── Card Top ── */
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.plan-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  flex: 1;
}

/* ── Ads Badge ── */
.ads-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 7px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.ads-badge svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.ads-yes {
  background: rgba(255, 160, 0, 0.08);
  color: #ffb347;
  border: 1px solid rgba(255, 160, 0, 0.18);
}

.ads-no {
  background: rgba(50, 210, 120, 0.08);
  color: #4ade80;
  border: 1px solid rgba(50, 210, 120, 0.18);
}

/* ── Price ── */
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}

.price-amount {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1;
}

.price-period {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ── Features List ── */
.features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-soft);
  font-weight: 400;
  line-height: 1.5;
}

.feature-check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-check svg {
  width: 8px;
  height: 8px;
  stroke: var(--accent);
}

/* ── Animation ── */
@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Mobile ── */
@media (max-width: 640px) {
  header {
    padding: 36px 20px 24px;
  }

  main {
    padding: 0 20px 60px;
  }

  .logo { font-size: 20px; }

  .custom-select {
    max-width: 100%;
  }

  .dropdown-inner {
    grid-template-columns: repeat(3, 1fr);
    padding: 8px;
  }

  .item-logo {
    width: 40px;
    height: 40px;
  }

  .dropdown-item {
    padding: 12px 6px;
  }

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

  .plans-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .price-amount { font-size: 28px; }

  .plan-card {
    padding: 20px 18px 22px;
  }
}

@media (max-width: 380px) {
  .dropdown-inner {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-top {
    flex-direction: column;
  }
}

