/* ==========================================================================
   Pyek AI — Components
   Buttons, cards, hero, bands, tables, pricing, comparison, callouts
   ========================================================================== */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 22px;
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: transform var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-ink);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--color-ink-2); color: #fff; box-shadow: var(--shadow); }

.btn-accent {
  background: var(--color-accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-accent:hover { background: var(--color-accent-dark); color: #fff; box-shadow: var(--shadow); }

.btn-warm {
  background: var(--color-accent-warm);
  color: var(--color-ink);
  box-shadow: var(--shadow-sm);
}
.btn-warm:hover { background: #D97706; color: #fff; box-shadow: var(--shadow); }

.btn-outline {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-border-strong);
}
.btn-outline:hover { border-color: var(--color-ink); color: var(--color-ink); background: var(--color-bg-alt); }

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.btn-outline-light:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, 0.08); }

.btn-ghost {
  background: transparent;
  color: var(--color-ink);
  padding: 10px 14px;
}
.btn-ghost:hover { color: var(--color-accent-dark); background: var(--color-bg-alt); }

.btn-lg { padding: 16px 28px; font-size: var(--fs-md); }
.btn-sm { padding: 8px 14px; font-size: var(--fs-sm); }
.btn-block { width: 100%; }

.btn .icon { width: 18px; height: 18px; }

/* ---------- Cards ---------- */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--color-border-strong);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: rgba(6, 182, 212, 0.1);
  color: var(--color-accent-dark);
  margin-bottom: var(--space-4);
}
.card-icon svg { width: 24px; height: 24px; }

.card-flat {
  background: var(--color-bg-alt);
  border: 1px solid transparent;
}
.card-flat:hover { background: var(--color-bg); border-color: var(--color-border); }

.card-dark {
  background: var(--color-ink-2);
  border-color: rgba(255, 255, 255, 0.08);
  color: #CBD5E1;
}
.card-dark h3, .card-dark h4 { color: #fff; }
.card-dark:hover { background: #243F66; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 500px;
  height: 60vh;
  max-height: 540px;
  padding: calc(var(--nav-height) + var(--space-16)) 0 var(--space-16);
  background:
    linear-gradient(135deg, rgba(8, 18, 38, 0.78) 0%, rgba(8, 18, 38, 0.45) 100%),
    url('../images/data-exploding-effect.jpg') 72% center / cover no-repeat;
  color: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero .container, .hero .container-narrow { position: relative; z-index: 1; }
.hero h1 {
  color: #fff;
  margin-bottom: var(--space-5);
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.15;
}
.hero .lead { color: #E2E8F0; font-size: var(--fs-lg); max-width: 640px; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}
@media (min-width: 768px) {
  .hero {
    min-height: 500px;
    height: 72vh;
    max-height: 680px;
    padding: calc(var(--nav-height) + var(--space-20)) 0 var(--space-20);
    background:
      linear-gradient(135deg, rgba(8, 18, 38, 0.65) 0%, rgba(8, 18, 38, 0.12) 100%),
      url('../images/data-exploding-effect.jpg') right center / cover no-repeat;
  }
  .hero .lead { font-size: var(--fs-xl); }
}

.hero-sub {
  padding: calc(var(--nav-height) + var(--space-12)) 0 var(--space-12);
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}
.hero-sub h1 { font-size: clamp(2rem, 3vw, var(--fs-4xl)); margin-bottom: var(--space-4); }
.hero-sub .lead { max-width: 780px; }
@media (min-width: 768px) {
  .hero-sub { padding: calc(var(--nav-height) + var(--space-16)) 0 var(--space-16); }
}

/* ---------- Section headers ---------- */
.section-header {
  max-width: 720px;
  margin: 0 auto var(--space-12);
  text-align: center;
}
.section-header.left { margin-left: 0; text-align: left; }
.section-header h2 { margin-bottom: var(--space-4); }
.section-header p { color: var(--color-text-muted); font-size: var(--fs-md); margin-bottom: 0; }

/* ---------- Feature list ---------- */
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li {
  position: relative;
  padding: var(--space-3) 0 var(--space-3) var(--space-8);
  border-bottom: 1px solid var(--color-border);
}
.feature-list li:last-child { border-bottom: 0; }
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background: var(--color-accent);
  border-radius: 50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-size: 14px;
  background-repeat: no-repeat;
  background-position: center;
}

/* Negative list (for comparison "cons" columns) */
.feature-list.neg li::before {
  background: #E2E8F0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><line x1='18' y1='6' x2='6' y2='18'/><line x1='6' y1='6' x2='18' y2='18'/></svg>");
}

/* ---------- Step / process ---------- */
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-4);
  align-items: start;
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--color-border);
}
.step:last-child { border-bottom: 0; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-ink);
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-md);
}
.step h3 { margin-top: 0; margin-bottom: var(--space-2); font-size: var(--fs-lg); }
.step p { margin-bottom: 0; color: var(--color-text-muted); }

/* ---------- Stat tiles ---------- */
.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
/* 2-column variant (e.g. when nested inside a split) */
@media (min-width: 640px) { .stats.stats-2col { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .stats.stats-2col { grid-template-columns: repeat(2, 1fr); } }
.stat {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  text-align: center;
}
.stat-num {
  display: block;
  font-size: var(--fs-3xl);
  font-weight: 800;
  color: var(--color-ink);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}
.stat-label {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-dark .stat {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
.section-dark .stat-num { color: #fff; }
.section-dark .stat-label { color: #94A3B8; }

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 900px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); } }

.price-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.price-card.featured {
  border: 2px solid var(--color-accent);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.price-card.featured::before {
  content: "Core offering";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: #fff;
  padding: 4px 12px;
  font-size: var(--fs-xs);
  font-weight: 700;
  border-radius: var(--radius-full);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.price-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.price-card h3 { margin-top: 0; font-size: var(--fs-xl); }
.price-card .price {
  font-size: var(--fs-3xl);
  font-weight: 800;
  color: var(--color-ink);
  letter-spacing: -0.02em;
  margin: var(--space-4) 0 var(--space-2);
  line-height: 1.1;
}
.price-card .price .unit { font-size: var(--fs-base); font-weight: 500; color: var(--color-text-muted); }
.price-card .price-sub { color: var(--color-text-muted); font-size: var(--fs-sm); margin-bottom: var(--space-6); }
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-6);
  flex: 1;
}
.price-card ul li {
  padding: var(--space-2) 0 var(--space-2) var(--space-6);
  position: relative;
  font-size: var(--fs-sm);
  color: var(--color-text);
}
.price-card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306B6D4' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-size: 14px;
  background-repeat: no-repeat;
}

/* ---------- Comparison grid ---------- */
.compare {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 900px) { .compare { grid-template-columns: repeat(3, 1fr); } }
.compare-col {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
}
.compare-col.highlight {
  background: var(--color-bg);
  border-color: var(--color-accent);
  box-shadow: var(--shadow);
}
.compare-col h3 {
  margin-top: 0;
  font-size: var(--fs-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.compare-col .badge-cost {
  font-size: var(--fs-xs);
  font-weight: 700;
  background: var(--color-ink);
  color: #fff;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Callout band ---------- */
.callout {
  background: var(--color-ink);
  color: #fff;
  padding: var(--space-12) 0;
  text-align: center;
}
.callout h2 { color: #fff; margin-bottom: var(--space-4); }
.callout p { color: #CBD5E1; max-width: 640px; margin: 0 auto var(--space-6); font-size: var(--fs-md); }
.callout .btn-ghost { color: #fff; }
.callout .btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

/* Alt callout — amber */
.callout-warm {
  background: linear-gradient(135deg, var(--color-ink) 0%, #1E3A5F 100%);
}

/* ---------- Logo strip ---------- */
.logo-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  align-items: center;
  opacity: 0.8;
}
@media (min-width: 640px) { .logo-strip { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .logo-strip { grid-template-columns: repeat(5, 1fr); } }
.logo-strip div {
  text-align: center;
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-text-subtle);
  padding: var(--space-4);
}

/* ---------- Quote / testimonial ---------- */
.quote {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  font-size: var(--fs-xl);
  color: var(--color-ink);
  font-weight: 500;
  line-height: 1.5;
  position: relative;
}
.quote::before {
  content: "\201C";
  display: block;
  font-size: 4rem;
  line-height: 1;
  color: var(--color-accent);
  font-family: Georgia, serif;
  margin-bottom: var(--space-2);
}
.quote-attr {
  margin-top: var(--space-4);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4) 0;
}
.faq-item:last-child { border-bottom: 0; }
.faq-item summary {
  font-weight: 600;
  font-size: var(--fs-md);
  color: var(--color-ink);
  cursor: pointer;
  padding: var(--space-2) 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-weight: 400;
  font-size: var(--fs-xl);
  color: var(--color-accent-dark);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item[open] summary { color: var(--color-accent-dark); }
.faq-item p {
  margin: var(--space-3) 0 var(--space-2);
  color: var(--color-text-muted);
}

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  background: var(--color-bg);
}
.data-table th, .data-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.data-table th {
  background: var(--color-bg-alt);
  font-weight: 600;
  color: var(--color-ink);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--fs-xs);
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--color-bg-alt); }

/* ---------- Forms ---------- */
.form-field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.form-field label { font-weight: 600; font-size: var(--fs-sm); color: var(--color-ink); }
.form-field .hint { font-size: var(--fs-xs); color: var(--color-text-muted); }
.form-field input,
.form-field select,
.form-field textarea {
  font-family: inherit;
  font-size: var(--fs-base);
  padding: 12px 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}
.form-field textarea { min-height: 140px; resize: vertical; }

.form-row { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; gap: var(--space-4); } }

.form-msg {
  padding: var(--space-4);
  border-radius: var(--radius);
  margin-top: var(--space-4);
  font-size: var(--fs-sm);
  display: none;
}
.form-msg.success {
  display: block;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
}
.form-msg.error {
  display: block;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

/* ---------- Badges / pills ---------- */
.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  background: rgba(6, 182, 212, 0.12);
  color: var(--color-accent-dark);
}
.badge-warm { background: rgba(245, 158, 11, 0.14); color: #B45309; }
.badge-neutral { background: var(--color-bg-alt); color: var(--color-text-muted); }

/* ---------- Split / two-column ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--space-12); }
  .split.split-wider > :first-child { padding-right: var(--space-4); }
  .split.split-3-2 { grid-template-columns: 3fr 2fr; gap: var(--space-12); }
  .contact-aside-card { position: sticky; top: calc(var(--nav-height) + var(--space-4)); }
}
.split h2 { margin-bottom: var(--space-4); }

/* ---------- Icon grid ---------- */
.icon-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 640px) { .icon-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .icon-grid { grid-template-columns: repeat(3, 1fr); } }
.icon-grid .card { text-align: left; }

/* ---------- Pull quote / highlight band ---------- */
.highlight-band {
  padding: var(--space-12) 0;
  background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* ---------- Who we serve — subgrid row alignment ---------- */
@media (min-width: 900px) {
  #who-serves-grid {
    row-gap: 0;
  }
  #who-serves-grid .card {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 3;
  }
}

/* ---------- Animations (subtle) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .fade-in { animation: fadeIn 0.6s ease-out both; }
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
