/* VELOR Cloud - Architectural Editorial (/), Native TMA (/app), Info (/info) */

/* === Landing Hero === */
.hero-section {
  padding: 40px 0 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 40px;
  align-items: center;
}

.hero-grid > * {
  min-width: 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(2.25rem, 4.7vw, 3.85rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin-bottom: 20px;
}

.hero-lead {
  font-size: 17px;
  line-height: 1.62;
  color: var(--text-secondary);
  max-width: 46ch;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.hero-text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: var(--border-strong);
  transition: color 160ms var(--ease-aaa), text-decoration-color 160ms var(--ease-aaa);
}

.hero-text-link:hover {
  color: var(--text-primary);
  text-decoration-color: var(--text-primary);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding-top: 22px;
  border-top: 1px solid var(--border-subtle);
}

.hero-metric-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.hero-metric-lbl {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Art-First Monolith Stage (Zero box border in Dark, Clean architectural frame in Light) */
.hero-art-stage {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  width: 100%;
  max-width: 450px;
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 0;
}

[data-theme="light"] .hero-art-stage {
  background: #06050a;
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  overflow: hidden;
  padding: 0;
  box-shadow: 0 22px 48px rgba(13, 7, 23, 0.14);
}

.hero-monolith-img {
  display: block;
  width: 100%;
  max-width: 450px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

[data-theme="dark"] .hero-monolith-img {
  mix-blend-mode: lighten;
  -webkit-mask-image: radial-gradient(circle at center, #000000 58%, rgba(0, 0, 0, 0.8) 72%, transparent 94%);
  mask-image: radial-gradient(circle at center, #000000 58%, rgba(0, 0, 0, 0.8) 72%, transparent 94%);
}

/* Sleek Trial Strip */
.trial-strip {
  margin: 8px 0 44px;
  padding: 20px 26px;
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.trial-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 68ch;
  min-width: 0;
}

.trial-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.trial-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Landing Sections */
.section-block {
  padding: 44px 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-title {
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.section-sub {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 6px;
  max-width: 56ch;
}

/* Plans Grid */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: border-color 180ms var(--ease-aaa);
  min-width: 0;
  max-width: 100%;
}

.plan-card.is-featured {
  border-color: rgba(110, 72, 245, 0.56);
  background-color: var(--bg-elevated);
}

[data-theme="light"] .plan-card.is-featured {
  border-color: #0d0717;
  background-color: #ffffff;
}

.plan-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.plan-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.plan-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.plan-price {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.plan-old-price {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.plan-per-month {
  font-size: 13px;
  color: var(--text-muted);
}

.plan-specs {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14px;
  color: var(--text-secondary);
}

.plan-spec-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-cta {
  margin-top: auto;
  width: 100%;
}

/* Addons - 2-Column Hairline Editorial List (Zero Boxitis) */
.addons-editorial {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 40px;
  border-bottom: 1px solid var(--border-subtle);
}

.addon-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--border-subtle);
  min-width: 0;
}

.addon-row-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.addon-row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.addon-row-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.addon-row-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

.addon-row-action {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.addon-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Locations - 2-Column Architectural Hairline Matrix */
.locations-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.loc-matrix-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  min-width: 0;
}

.loc-matrix-row:nth-child(odd) {
  border-right: 1px solid var(--border-subtle);
}

.loc-matrix-row:nth-last-child(-n+2) {
  border-bottom: 0;
}

.loc-matrix-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.loc-matrix-left > div {
  min-width: 0;
}

.location-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  overflow-wrap: break-word;
}

.location-sub {
  font-size: 13px;
  color: var(--text-muted);
  overflow-wrap: break-word;
}

.loc-matrix-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.loc-ping {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.loc-status-txt {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ok);
}

.loc-status-txt.is-warn {
  color: var(--warn);
}

.loc-status-txt.is-danger {
  color: var(--danger);
}

/* === App / TMA Shell === */
body.app-body {
  padding-top: var(--tg-content-safe-area-inset-top, 0px);
}

body.is-tma .site-header {
  min-height: 48px;
}

body.is-tma .header-inner {
  min-height: 48px;
}

body.is-tma .header-hide-tma {
  display: none !important;
}

.tma-top-pill {
  display: none;
}

body.is-tma .tma-top-pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.app-auth-wrap {
  max-width: 460px;
  margin: 40px auto;
}

.app-shell {
  display: grid;
  grid-template-columns: 236px 1fr;
  gap: 24px;
  padding-block: 22px 48px;
  align-items: start;
}

.app-sidebar {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.app-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background-color: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background-color 150ms var(--ease-aaa), color 150ms var(--ease-aaa);
}

.app-nav-btn:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.app-nav-btn[aria-selected="true"] {
  background-color: var(--btn-active-bg);
  color: var(--btn-active-text);
  border-color: var(--btn-active-bg);
}

.app-sidebar-meta {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Native TMA Connection Hero */
.tma-hero {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.tma-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sub-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.tma-hero-plan {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  overflow-wrap: break-word;
}

.tma-hero-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.tma-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 14px;
  color: var(--text-secondary);
}

.tma-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tma-primary-cta {
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  font-size: 15px;
}

.tma-secondary-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tma-secondary-row .btn {
  width: 100%;
  border-radius: 12px;
}

/* Native iOS / Telegram Grouped Inset List */
.velor-ios-group {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  min-width: 0;
}

.velor-ios-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  background: transparent;
  border: 0;
  text-align: left;
  color: var(--text-primary);
  min-width: 0;
}

.velor-ios-row + .velor-ios-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background-color: var(--border-subtle);
}

button.velor-ios-row,
a.velor-ios-row {
  cursor: pointer;
  transition: background-color 140ms var(--ease-aaa);
}

button.velor-ios-row:hover,
a.velor-ios-row:hover {
  background-color: var(--bg-hover);
}

button.velor-ios-row:active,
a.velor-ios-row:active {
  background-color: var(--bg-elevated);
}

.velor-ios-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.velor-ios-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.velor-ios-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  overflow-wrap: break-word;
}

.velor-ios-sub {
  font-size: 13px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.velor-ios-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.velor-ios-val {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.velor-ios-group-head {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 4px 0;
  letter-spacing: 0.01em;
}

/* Legacy helpers kept clean for compatibility */
.sub-url-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  min-width: 0;
  max-width: 100%;
}

.sub-url-line .btn {
  flex-shrink: 0;
}

.sub-url-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 0;
  min-width: 0;
}

.app-split-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.app-split-cards > * {
  min-width: 0;
}

.qr-dialog-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.qr-frame {
  display: inline-grid;
  place-items: center;
  padding: 14px;
  border-radius: 16px;
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
}

.qr-frame svg {
  display: block;
  width: 220px;
  height: 220px;
}

.ticket-list {
  display: flex;
  flex-direction: column;
}

.ticket-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  transition: background-color 140ms var(--ease-aaa);
}

.ticket-item + .ticket-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background-color: var(--border-subtle);
}

.ticket-item > div:first-child {
  min-width: 0;
  flex-wrap: wrap;
}

.ticket-item strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ticket-item:hover,
.ticket-item.is-selected {
  background-color: var(--bg-hover);
}

.thread-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding: 14px;
  border-radius: var(--radius-md);
  background-color: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  min-width: 0;
}

.msg-bubble {
  max-width: 86%;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.msg-customer {
  align-self: flex-end;
  background-color: var(--accent-solid);
  color: #ffffff;
}

.msg-support {
  align-self: flex-start;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}

.msg-meta {
  font-size: 12px;
  opacity: 0.78;
  margin-bottom: 4px;
}

.mobile-bottom-nav {
  display: none;
}

/* === Info Page === */
.info-wrap {
  max-width: 860px;
  margin: 40px auto 72px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.info-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.info-prose {
  font-size: 15px;
  line-height: 1.72;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 14px;
  white-space: pre-wrap;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.info-section {
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.verify-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 960px) {
  .hero-grid,
  .plans-grid,
  .addons-editorial,
  .locations-matrix,
  .app-split-cards {
    grid-template-columns: 1fr;
  }

  .loc-matrix-row:nth-child(odd) {
    border-right: 0;
  }

  .loc-matrix-row:nth-last-child(-n+2) {
    border-bottom: 1px solid var(--border-subtle);
  }

  .loc-matrix-row:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding-block: 14px calc(92px + env(safe-area-inset-bottom));
  }

  .app-sidebar {
    display: none;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    padding: 6px 6px calc(8px + env(safe-area-inset-bottom));
    background-color: var(--nav-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-subtle);
  }

  .mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 48px;
    padding: 4px 2px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
  }

  .mobile-nav-btn[aria-selected="true"] {
    color: var(--text-primary);
    background-color: var(--accent-soft);
  }

  .mobile-nav-btn[aria-selected="true"]::after {
    content: "";
    position: absolute;
    top: 0;
    left: 24%;
    right: 24%;
    border-top: 2px solid var(--accent);
  }

  .hero-section {
    padding: 32px 0 28px;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tma-hero {
    padding: 18px 16px;
  }

  .addon-row-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .addon-row-action {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 680px) {
  dialog.velor-dialog.tma-sheet {
    width: 100%;
    max-width: 100vw;
    max-height: 90dvh;
    margin: auto auto 0;
    border-radius: 20px 20px 0 0;
    border-bottom: 0;
  }
}
