/* Decaweb Tools hub — visual language matched to decaweb.ir */
html:has(body.hub),
body.hub {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.hub {
  margin: 0;
  min-height: 100dvh;
  height: auto;
  overflow: visible;
  background: var(--hub-bg);
  color: var(--hub-text);
  font-family: "Modam", Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased;
}

html[data-theme="dark"] {
  --hub-bg: #0f0f10;
  --hub-surface: #171719;
  --hub-surface-2: #1d1d20;
  --hub-border: #29292c;
  --hub-border-strong: #343438;
  --hub-text: #f7f7f4;
  --hub-muted: #a2a2a6;
  --hub-accent: #e45d1a;
  --hub-accent-hover: #f06a24;
  --hub-paper: #ffffff;
  --hub-ink: #171719;
}

html[data-theme="light"] {
  --hub-bg: #f7f7f4;
  --hub-surface: #ffffff;
  --hub-surface-2: #f0efeb;
  --hub-border: #d9d8d3;
  --hub-border-strong: #c9c8c3;
  --hub-text: #171719;
  --hub-muted: #5d5d62;
  --hub-accent: #c84e12;
  --hub-accent-hover: #e45d1a;
  --hub-paper: #ffffff;
  --hub-ink: #171719;
}

.hub-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(20px, 4vw, 32px);
  height: 72px;
  border-bottom: 1px solid var(--hub-border);
  background: color-mix(in srgb, var(--hub-bg) 95%, transparent);
  backdrop-filter: blur(12px);
}

.hub-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hub-link {
  color: var(--hub-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}
.hub-link:hover { color: var(--hub-text); }
.hub-link:focus-visible {
  outline: 2px solid var(--hub-accent);
  outline-offset: 4px;
}

.hub .btn {
  min-height: 44px;
  border-radius: 0;
}

.hub-hero {
  position: relative;
  overflow: hidden;
  min-height: min(72dvh, 640px);
  display: grid;
  place-items: center;
  padding: clamp(56px, 9vh, 96px) clamp(20px, 4vw, 32px) 64px;
  border-bottom: 1px solid var(--hub-border);
  background: var(--hub-bg);
}

.hub-hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black 20%, transparent 95%);
  pointer-events: none;
}
html[data-theme="light"] .hub-hero-grid {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.055) 1px, transparent 1px);
}

.hub-hero-inner {
  position: relative;
  width: min(720px, 100%);
  margin-inline: auto;
  text-align: center;
}

.hub-eyebrow {
  margin: 0 0 16px;
  color: var(--hub-accent);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.hub-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  line-height: 1.15;
}

.hub-title-brand {
  display: block;
  font-size: clamp(2.7rem, 8vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hub-accent);
}

.hub-title-tools {
  display: block;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--hub-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hub-sub {
  margin: 24px auto 0;
  max-width: 36ch;
  color: var(--hub-muted);
  font-size: 1.125rem;
  line-height: 1.85;
  font-weight: 400;
}

.hub-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.hub-cta {
  min-width: 180px;
}

.hub-hero[data-enter] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.hub-hero[data-enter].is-in {
  opacity: 1;
  transform: none;
}

.hub-featured,
.hub-soon {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 24px;
  border-bottom: 1px solid var(--hub-border);
}

.hub-section-head {
  margin-bottom: 28px;
}
.hub-section-head .hub-eyebrow {
  margin-bottom: 12px;
}
.hub-section-head h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--hub-text);
}
.hub-section-head p {
  margin: 16px 0 0;
  color: var(--hub-muted);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 40ch;
}

.feature-tools {
  display: grid;
  gap: 16px;
}

.feature-tool {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  min-height: 280px;
  border: 1px solid var(--hub-border);
  border-radius: 0;
  overflow: hidden;
  background: var(--hub-surface);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.feature-tool:hover {
  transform: translateY(-2px);
  border-color: var(--hub-border-strong);
}
.feature-tool:active { transform: translateY(0); }
.feature-tool:focus-visible {
  outline: 2px solid var(--hub-accent);
  outline-offset: 4px;
}

.feature-tool-copy {
  padding: clamp(28px, 3.5vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  background: var(--hub-surface);
}

.feature-pill {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 0;
  border: 1px solid color-mix(in srgb, var(--hub-accent) 40%, var(--hub-border));
  background: transparent;
  color: var(--hub-accent);
}

.feature-tool-copy h3 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.feature-tool-copy p {
  margin: 0;
  color: var(--hub-muted);
  font-size: 1rem;
  line-height: 1.8;
  font-weight: 400;
  max-width: 40ch;
}

.feature-go {
  margin-top: 8px;
  color: var(--hub-accent);
  font-weight: 700;
  font-size: 14px;
}

.feature-tool-visual {
  background: #111113;
  display: grid;
  place-items: center;
  padding: 28px;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--hub-border);
}
html[data-theme="light"] .feature-tool-visual {
  background: #e7e6e1;
  border-right-color: var(--hub-border);
}

.feature-tool-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
html[data-theme="light"] .feature-tool-visual::before {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
}

.mini-invoice {
  width: min(260px, 100%);
  aspect-ratio: 210 / 260;
  background: var(--hub-paper);
  color: var(--hub-ink);
  border-radius: 0;
  border: 1px solid #d9d8d3;
  padding: 16px 14px;
  box-shadow: 0 22px 70px rgb(0 0 0 / 40%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: rotate(-2deg);
  transition: transform 0.25s ease;
  position: relative;
  z-index: 1;
}
.feature-tool:hover .mini-invoice {
  transform: rotate(0deg) translateY(-4px);
}

.mini-invoice-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  border-bottom: 2px solid #171719;
  padding-bottom: 8px;
}
.mini-invoice-top strong {
  font-size: 13px;
  font-weight: 700;
}
.mini-invoice-top span {
  font-size: 9px;
  font-weight: 700;
  color: #e45d1a;
}

.mini-invoice-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  background: #f7f7f4;
  padding: 8px;
}

.mini-invoice-row {
  height: 10px;
  background: #ecebe7;
}
.mini-invoice-row--short { width: 62%; }

.mini-invoice-total {
  margin-top: auto;
  background: #171719;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 10px 8px;
  text-align: center;
}

.mini-qr {
  width: min(180px, 70%);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 3px;
  padding: 14px;
  background: #fff;
  border: 1px solid #d9d8d3;
  box-shadow: 0 18px 40px rgb(0 0 0 / 28%);
  position: relative;
  z-index: 1;
  transition: transform 0.25s ease;
}
.feature-tool:hover .mini-qr {
  transform: translateY(-4px);
}
.mini-qr span { background: #ecebe7; }
.mini-qr span.on { background: #171719; }
.mini-qr span.accent { background: #e45d1a; }

.soon-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--hub-border);
  border-radius: 0;
  overflow: hidden;
  background: var(--hub-surface);
}

.soon-list li {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr auto;
  gap: 12px;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--hub-border);
}
.soon-list li:last-child { border-bottom: 0; }

.soon-name {
  font-weight: 700;
  font-size: 1.05rem;
}
.soon-desc {
  color: var(--hub-muted);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.6;
}
.soon-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--hub-muted);
  background: transparent;
  border: 1px solid var(--hub-border);
  border-radius: 0;
  padding: 6px 10px;
  white-space: nowrap;
}

.hub-promo {
  margin-top: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
  background: #141414;
  color: #f7f7f4;
  border-top: 1px solid #29292c;
}
html[data-theme="light"] .hub-promo {
  background: #171719;
}

.hub-promo::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black 10%, transparent 90%);
  pointer-events: none;
}

.hub-promo-inner {
  position: relative;
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(64px, 10vh, 112px) 0;
  text-align: center;
}

.hub-eyebrow--on-dark { color: #e45d1a; }

.hub-promo h2 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #fff;
}

.hub-promo p {
  margin: 20px auto 0;
  max-width: 46ch;
  color: #a2a2a6;
  font-size: 1.1rem;
  line-height: 1.8;
  font-weight: 400;
}

.hub-promo-btn {
  margin-top: 32px;
  background: #e45d1a;
  border-color: transparent;
  color: #fff;
  min-width: 220px;
}
.hub-promo-btn:hover {
  background: #f06a24;
  border-color: transparent;
  transform: translateY(-2px);
}

.hub-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 28px 20px;
  color: #85858a;
  font-size: 12px;
  font-weight: 500;
  border-top: 1px solid var(--hub-border);
  background: var(--hub-bg);
}
.hub-foot a {
  color: inherit;
  text-decoration: none;
}
.hub-foot a:hover { color: var(--hub-text); }

@media (max-width: 820px) {
  .feature-tool {
    grid-template-columns: 1fr;
  }
  .feature-tool-visual {
    min-height: 220px;
    order: -1;
    border-right: 0;
    border-bottom: 1px solid var(--hub-border);
  }
  .soon-list li {
    grid-template-columns: 1fr auto;
  }
  .soon-desc {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .hub-cta {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-hero[data-enter],
  .feature-tool,
  .mini-invoice,
  .hub .btn {
    transition: none !important;
  }
}
