/* ─── Amber theme — tokens from the Figma design system ────────────── */
:root {
  --p-bg: #fafaf9;                 /* bg/surface */
  --p-surface: #ffffff;            /* bg/surface-raised */
  --p-text: #1c1917;               /* text/primary */
  --p-muted: #57534e;              /* text/secondary */
  --p-dim: #a8a29e;                /* border/strong as dim text */
  --p-green-deep: #1c1917;         /* dark CTA */
  --p-green: #f97316;              /* action/primary */
  --p-orange: #c2410c;             /* button/primary/accent */
  --p-border: #e7e5e4;             /* border/default */
  --font: 'Nunito Sans', sans-serif;

  /* amber tokens */
  --am-primary: #f97316;
  --am-primary-subtle: #ffedd5;
  --am-primary-accent: #c2410c;
  --am-secondary: #1e3a8a;
  --am-success: #15803d;
  --am-success-subtle: #f0fdf4;
  --am-warning: #b45309;
  --am-warning-subtle: #fffbeb;
  --am-error: #b91c1c;
  --am-error-subtle: #fef2f2;
  --am-subtle: #f5f5f4;
  --am-radius: 8px;
}

.phero__title-sub { color: var(--am-primary-accent); }

.phero__wordmark {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--am-primary);
  background: #0c0a09;
  border-radius: var(--am-radius);
  padding: 8px 12px;
}

.pfooter-nav__cta:hover { background: var(--am-primary); }
.pnav__contact:hover { background: #0c0a09; border-color: #0c0a09; }

/* case study figures */
.pfigure { margin: 32px 0 8px; }
.pfigure img {
  display: block;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--p-border);
}
.pfigure figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--p-dim);
  margin-top: 12px;
  text-align: center;
}

/* ─── Component showcase rows ──────────────────────────────────────── */
.acomp {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
  border: 1px solid var(--p-border);
  border-radius: 14px;
  background: var(--p-surface);
  padding: 32px;
  margin-top: 24px;
}
.acomp__demo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: var(--p-bg);
  border: 1px dashed var(--p-border);
  border-radius: var(--am-radius);
  padding: 28px 24px;
  min-height: 120px;
}
.acomp__demo--block { flex-direction: column; align-items: stretch; }
.acomp__info h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.acomp__info p { font-size: 14.5px; margin-bottom: 0; }

/* ─── Amber components (rebuilt from tokens) ───────────────────────── */
.am-btn {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--am-radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.am-btn--filled { background: var(--am-primary); color: #0c0a09; }
.am-btn--filled:hover { background: var(--am-primary-accent); color: #fff; }
.am-btn--outlined { background: transparent; color: #334155; border-color: var(--p-border); }
.am-btn--outlined:hover { border-color: #a8a29e; background: var(--am-subtle); }
.am-btn--secondary { background: var(--am-secondary); color: #fff; }
.am-btn--secondary:hover { background: #16306f; }

.am-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 100px;
}
.am-badge--success { color: var(--am-success); background: var(--am-success-subtle); }
.am-badge--warning { color: var(--am-warning); background: var(--am-warning-subtle); }
.am-badge--error   { color: var(--am-error);   background: var(--am-error-subtle); }

.am-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--p-muted);
  background: var(--am-subtle);
  border: 1px solid var(--p-border);
  border-radius: var(--am-radius);
  padding: 6px 12px;
}
.am-tag b { font-weight: 700; color: var(--p-dim); cursor: pointer; }
.am-tag b:hover { color: var(--am-error); }

.am-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  background: var(--am-warning-subtle);
  border: 1px solid #fde68a;
  border-radius: var(--am-radius);
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--p-text);
  line-height: 1.55;
}
.am-alert strong { color: var(--am-warning); }
.am-alert__icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--am-warning);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.am-alert__close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 16px;
  color: var(--p-dim);
  cursor: pointer;
}
.am-alert__close:hover { color: var(--p-text); }

.am-tabs { display: flex; border-bottom: 1px solid var(--p-border); width: 100%; }
.am-tab {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  color: var(--p-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 13px 20px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.am-tab:hover { color: var(--p-text); }
.am-tab--active { color: var(--p-text); border-bottom-color: var(--am-primary); }

.am-kpi {
  flex: 1;
  min-width: 190px;
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--am-radius);
  padding: 18px;
}
.am-kpi__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--p-muted);
  margin-bottom: 10px;
}
.am-kpi__value {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.am-kpi__trend { font-size: 12px; font-weight: 700; }
.am-kpi__trend--up { color: var(--am-success); }
.am-kpi__trend--down { color: var(--am-error); }

.am-budget { width: 100%; }
.am-budget + .am-budget { margin-top: 14px; }
.am-budget__row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
}
.am-budget__row span:last-child { color: var(--p-muted); font-weight: 400; }
.am-progress {
  height: 8px;
  background: var(--am-subtle);
  border-radius: 100px;
  overflow: hidden;
}
.am-progress span {
  display: block;
  height: 100%;
  background: var(--am-primary);
  border-radius: 100px;
}
.am-progress--full span { background: var(--am-error); }

.acomp__demo--form { gap: 14px; }
.am-field { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.am-field__label { font-size: 13px; font-weight: 700; }
.am-input, .am-select, .am-search {
  height: 44px;
  border: 1px solid var(--p-border);
  border-radius: var(--am-radius);
  background: var(--p-surface);
  font-family: var(--font);
  font-size: 14px;
  color: var(--p-text);
  padding: 0 14px;
  width: 100%;
}
.am-input:focus { outline: 2px solid var(--am-primary); outline-offset: -1px; border-color: transparent; }
.am-field__hint { font-size: 11.5px; color: var(--p-dim); }
.am-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--p-muted);
  cursor: pointer;
}
.am-select:hover { border-color: #a8a29e; }
.am-search { display: flex; align-items: center; gap: 10px; color: var(--p-dim); }
.am-search input {
  border: none;
  outline: none;
  background: none;
  font-family: var(--font);
  font-size: 14px;
  width: 100%;
  color: var(--p-text);
}

.am-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border-radius: var(--am-radius);
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 600;
}
.am-toast + .am-toast { margin-top: 10px; }
.am-toast--success { background: var(--am-success-subtle); color: var(--am-success); border: 1px solid #bbf7d0; }
.am-toast--error { background: var(--am-error-subtle); color: var(--am-error); border: 1px solid #fecaca; }
.am-toast b { font-weight: 800; }

.am-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 16px;
  cursor: pointer;
  user-select: none;
}
.am-toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.am-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.am-toggle i {
  position: absolute;
  inset: 0;
  background: var(--p-border);
  border-radius: 100px;
  transition: background 0.25s;
}
.am-toggle i::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.25s;
}
.am-toggle input:checked + i { background: var(--am-primary); }
.am-toggle input:checked + i::after { transform: translateX(20px); }

.am-pagination { display: flex; align-items: center; gap: 6px; }
.am-pagination button {
  width: 40px; height: 40px;
  border: 1px solid var(--p-border);
  border-radius: var(--am-radius);
  background: var(--p-surface);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--p-muted);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.am-pagination button:hover { border-color: #a8a29e; }
.am-pagination .am-page--active {
  background: var(--am-primary);
  border-color: var(--am-primary);
  color: #0c0a09;
}
.am-pagination span { color: var(--p-dim); padding: 0 2px; }

/* ─── Figma CTA ────────────────────────────────────────────────────── */
.afigma {
  display: flex;
  justify-content: center;
  margin-bottom: 72px;
}
.afigma__btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  background: #0c0a09;
  border-radius: 100px;
  padding: 18px 32px;
  transition: transform 0.25s, box-shadow 0.25s;
}
.afigma__btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -12px rgba(249, 115, 22, 0.45);
}

/* ─── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .acomp { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
  .pswatches + .pswatches { margin-top: 16px; }
}
