/* ============================================================
   PTG Agency Site — shared styles (built on PTG Design System)
   ============================================================ */

/* — Accent (tweakable: blue / cyan / amber) — */
:root {
  --accent:        var(--ptg-blue-500);
  --accent-hover:  var(--ptg-blue-400);
  --accent-soft:   rgba(79, 117, 201, 0.12);
  --accent-line:   rgba(79, 117, 201, 0.30);
  --accent-glow:   0 0 28px rgba(79, 117, 201, 0.28);
}
:root[data-accent="cyan"] {
  --accent:        var(--ptg-cyan-400);
  --accent-hover:  var(--ptg-cyan-300);
  --accent-soft:   rgba(42, 184, 212, 0.12);
  --accent-line:   rgba(42, 184, 212, 0.30);
  --accent-glow:   0 0 28px rgba(42, 184, 212, 0.26);
}
:root[data-accent="amber"] {
  --accent:        var(--ptg-amber-400);
  --accent-hover:  var(--ptg-amber-300);
  --accent-soft:   rgba(232, 131, 42, 0.12);
  --accent-line:   rgba(232, 131, 42, 0.32);
  --accent-glow:   0 0 28px rgba(232, 131, 42, 0.26);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--fg-secondary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent-soft); color: var(--fg-primary); }

/* — Layout — */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.section { padding: var(--space-9) 0; }
.section--tight { padding: var(--space-8) 0; }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent-line);
}

.display { font-family: var(--font-display); letter-spacing: var(--tracking-tight); color: var(--fg-primary); line-height: 1.05; }
.display-1 { font-size: clamp(44px, 6.4vw, 80px); }
.display-2 { font-size: clamp(34px, 4.4vw, 56px); }
.display-3 { font-size: clamp(28px, 3.2vw, 38px); }

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--fg-secondary);
  max-width: 56ch;
  font-weight: var(--weight-light);
}

.muted { color: var(--fg-tertiary); }
.mono { font-family: var(--font-mono); }

/* — Top nav — */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 25, 41, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.nav__logo { display: flex; align-items: center; }
.nav__logo img { height: 44px; width: auto; display: block; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__link {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--fg-tertiary);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  transition: color var(--duration-standard) var(--ease-out), background var(--duration-standard) var(--ease-out);
}
.nav__link:hover { color: var(--fg-primary); }
.nav__link[aria-current="page"] { color: var(--fg-primary); background: rgba(255,255,255,0.04); }
.nav__cta { margin-left: 12px; }

/* — Buttons — */
.btn {
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-md);
  padding: 13px 24px;
  transition: transform var(--duration-standard) var(--ease-out),
              background var(--duration-standard) var(--ease-out),
              border-color var(--duration-standard) var(--ease-out),
              box-shadow var(--duration-standard) var(--ease-out);
  white-space: nowrap;
}
.btn svg { display: block; width: 17px; height: 17px; }
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--accent-glow);
}
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn--primary:active { transform: scale(0.98); }
.btn--ghost {
  background: transparent;
  color: var(--fg-secondary);
  border: 1px solid var(--border-default);
}
.btn--ghost:hover { color: var(--fg-primary); border-color: var(--border-strong); transform: translateY(-2px); }
.btn--sm { padding: 9px 16px; font-size: var(--text-sm); border-radius: var(--radius-md); }
.btn--lg { padding: 16px 30px; font-size: var(--text-md); }

.textlink {
  color: var(--accent);
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: gap var(--duration-standard) var(--ease-out);
}
.textlink svg { width: 16px; height: 16px; }
.textlink:hover { gap: 11px; }

/* — Cards — */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
.card--pad { padding: var(--space-6); }
.card--hover { transition: transform var(--duration-standard) var(--ease-out), border-color var(--duration-standard) var(--ease-out); }
.card--hover:hover { transform: translateY(-3px); border-color: var(--border-default); }

/* — Stat — */
.stat-num {
  font-family: var(--font-mono);
  font-weight: var(--weight-bold);
  color: var(--fg-primary);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
}
.stat-num--xl { font-size: clamp(40px, 5vw, 64px); }
.stat-num--lg { font-size: var(--text-2xl); }
.stat-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--fg-tertiary);
}

/* — Tags / badges — */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  background: var(--accent-soft);
  color: var(--accent);
}
.tag--plat { background: rgba(79,117,201,0.14); color: var(--ptg-blue-300); }

/* — Dot-grid / glow backdrop — */
.gridbg { position: relative; overflow: hidden; }
.gridbg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
  background: var(--accent);
}

/* — Divider rule — */
.rule { height: 1px; background: var(--border-subtle); border: 0; margin: 0; }

/* — Footer — */
.footer { border-top: 1px solid var(--border-subtle); padding: var(--space-8) 0 var(--space-6); }
.footer__top { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.footer__logo img { height: 52px; width: auto; display: block; }
.footer__tag { margin-top: 16px; max-width: 30ch; color: var(--fg-tertiary); font-size: var(--text-sm); line-height: var(--leading-relaxed); }
.footer__cols { display: flex; gap: 72px; flex-wrap: wrap; }
.footer__col h6 { margin: 0 0 14px; font-size: var(--text-xs); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--fg-tertiary); font-weight: var(--weight-semibold); }
.footer__col a { display: block; font-size: var(--text-sm); color: var(--fg-secondary); padding: 5px 0; transition: color var(--duration-standard) var(--ease-out); }
.footer__col a:hover { color: var(--accent); }
.footer__base { display: flex; justify-content: space-between; align-items: center; margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--border-subtle); flex-wrap: wrap; gap: 16px; }
.footer__base p { margin: 0; font-size: var(--text-xs); color: var(--fg-disabled); }

/* — Form inputs — */
.field { display: block; margin-bottom: 18px; }
.field__label { display: block; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--fg-tertiary); margin-bottom: 7px; }
.input {
  width: 100%;
  box-sizing: border-box;
  background: var(--ptg-navy-700);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--fg-primary);
  outline: none;
  transition: border-color var(--duration-standard) var(--ease-out), box-shadow var(--duration-standard) var(--ease-out);
}
.input::placeholder { color: var(--fg-disabled); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 120px; line-height: var(--leading-normal); }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A9AB8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
.field__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* — Reveal-on-scroll — */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* — Tweaks panel (vanilla) — */
#tweaks {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  width: 232px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  padding: 16px;
  display: none;
  font-family: var(--font-body);
}
#tweaks.open { display: block; }
#tweaks .tw-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
#tweaks .tw-title { font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--fg-secondary); }
#tweaks .tw-close { background: none; border: none; color: var(--fg-tertiary); cursor: pointer; font-size: 18px; line-height: 1; padding: 2px; }
#tweaks .tw-close:hover { color: var(--fg-primary); }
#tweaks .tw-label { font-size: var(--text-xs); color: var(--fg-tertiary); margin-bottom: 9px; }
#tweaks .tw-swatches { display: flex; gap: 8px; }
#tweaks .tw-sw { flex: 1; height: 38px; border-radius: var(--radius-md); border: 2px solid transparent; cursor: pointer; position: relative; transition: transform var(--duration-standard) var(--ease-out); }
#tweaks .tw-sw:hover { transform: translateY(-1px); }
#tweaks .tw-sw[aria-pressed="true"] { border-color: #fff; }

/* — Responsive — */
@media (max-width: 860px) {
  .wrap { padding: 0 22px; }
  .nav__links { display: none; }
  .section { padding: var(--space-8) 0; }
}
