/* Pierlink public UI: landing, auth, setup, and shared brand polish. */

:root {
  --pl-ink: #07111f;
  --pl-navy: #0b172a;
  --pl-cyan: #0891b2;
  --pl-teal: #0f766e;
  --pl-green: #16a34a;
  --pl-rose: #e11d48;
  --pl-amber: #b45309;
  --pl-paper: #ffffff;
  --pl-soft: #f6f8fb;
  --pl-line: #dbe4ee;
  --pl-muted: #5c6675;
  --pl-shadow: 0 18px 50px rgba(7, 17, 31, 0.12);
}

html { scroll-behavior: smooth; }
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  background: var(--pl-paper);
  color: var(--pl-ink);
  font-family: Inter, "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body, button, input, textarea, select { letter-spacing: 0; }

.pl-brand-mark {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(8, 145, 178, 0.2);
}
.pl-brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.mkt-bar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(7, 17, 31, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.mkt-bar--scrolled {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: var(--pl-line);
  box-shadow: 0 10px 28px rgba(7, 17, 31, 0.08);
}
.mkt-bar__inner {
  max-width: 1180px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.mkt-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}
.mkt-brand:hover { text-decoration: none; color: #fff; }
.mkt-brand__name {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-weight: 800;
  font-size: 18px;
  line-height: 1.05;
  letter-spacing: 0;
}
.mkt-brand__sub {
  font-size: 11px;
  font-weight: 600;
  color: rgba(211, 250, 241, 0.82);
}
.mkt-bar--scrolled .mkt-brand { color: var(--pl-ink); }
.mkt-bar--scrolled .mkt-brand__sub { color: var(--pl-teal); }

.mkt-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 4px;
}
.mkt-nav__link,
.mkt-drawer__link {
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  font-weight: 650;
  padding: 8px 12px;
  border-radius: 7px;
  text-decoration: none;
}
.mkt-nav__link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
}
.mkt-bar--scrolled .mkt-nav__link { color: var(--pl-muted); }
.mkt-bar--scrolled .mkt-nav__link:hover {
  color: var(--pl-ink);
  background: #eef5f8;
}
.mkt-bar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mkt-btn-ghost,
.mkt-btn-solid {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.mkt-btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.34);
}
.mkt-btn-solid {
  color: var(--pl-ink);
  background: #fff;
}
.mkt-btn-ghost:hover,
.mkt-btn-solid:hover { text-decoration: none; }
.mkt-bar--scrolled .mkt-btn-ghost {
  color: var(--pl-muted);
  border-color: var(--pl-line);
}
.mkt-bar--scrolled .mkt-btn-solid {
  color: #fff;
  background: var(--pl-teal);
}

.mkt-bar__hamburger {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.12);
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  cursor: pointer;
}
.mkt-bar__hamburger span {
  height: 2px;
  border-radius: 3px;
  background: #fff;
}
.mkt-bar--scrolled .mkt-bar__hamburger { background: #eef5f8; }
.mkt-bar--scrolled .mkt-bar__hamburger span { background: var(--pl-ink); }

.mkt-drawer {
  position: fixed;
  inset: 0;
  z-index: 190;
  pointer-events: none;
  opacity: 0;
  background: rgba(7, 17, 31, 0.48);
  transition: opacity 180ms ease;
}
.mkt-drawer--open {
  opacity: 1;
  pointer-events: auto;
}
.mkt-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(310px, 86vw);
  height: 100%;
  padding: 28px 22px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%);
  transition: transform 220ms ease;
}
.mkt-drawer--open .mkt-drawer__panel { transform: translateX(0); }
.mkt-drawer__link {
  color: var(--pl-ink);
  border-bottom: 1px solid var(--pl-line);
  border-radius: 0;
}
.mkt-drawer__actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.hero {
  min-height: min(720px, calc(100vh - 76px));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
  background: var(--pl-navy) url("/assets/brand/pierlink-hero.svg") center / cover no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff 74%);
  z-index: -1;
}
.hero__content {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 86px 0 112px;
}
.hero__eyebrow {
  margin: 0 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #b6fff2;
  font-size: 14px;
  font-weight: 800;
}
.hero__title {
  margin: 0;
  max-width: 780px;
  font-size: clamp(52px, 8vw, 118px);
  line-height: 0.94;
  font-weight: 900;
  letter-spacing: 0;
}
.hero__sub {
  max-width: 640px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(18px, 2.1vw, 25px);
  line-height: 1.58;
}
.hero__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 0;
}
.hero__metric {
  min-width: 132px;
  padding: 13px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}
.hero__metric strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
}
.hero__metric span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
}
.hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.hero__cta-primary,
.hero__cta-secondary,
.bottom-cta__btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  border-radius: 8px;
  font-weight: 850;
  font-size: 15px;
  text-decoration: none;
}
.hero__cta-primary {
  background: #fff;
  color: var(--pl-ink);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}
.hero__cta-secondary {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}
.hero__cta-primary:hover,
.hero__cta-secondary:hover,
.bottom-cta__btn:hover { text-decoration: none; }
.hero__trust {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
}

.section-padded {
  padding: 92px 0;
  background: #fff;
}
.section-padded--alt { background: var(--pl-soft); }
.section-header {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}
.section-title {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
}
.section-sub {
  margin: 12px 0 0;
  color: var(--pl-muted);
  font-size: 17px;
  line-height: 1.7;
}

.feature-strip {
  margin-top: -92px;
  position: relative;
  z-index: 4;
}
.feature-grid,
.tier-grid,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
}
.feature-card,
.tier-card,
.price-card,
.faq-item {
  border: 1px solid var(--pl-line);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 8px;
  min-width: 0;
}
.feature-card {
  padding: 24px;
  box-shadow: var(--pl-shadow);
}
.feature-card__icon,
.tier-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--pl-cyan);
  background: #e7f8fb;
  border-radius: 8px;
  margin-bottom: 16px;
}
.feature-card__icon svg,
.tier-icon svg { width: 22px; height: 22px; }
.feature-card__icon--accent { color: var(--pl-amber); background: #fff6df; }
.feature-card__icon--teal { color: var(--pl-teal); background: #e8faf5; }
.feature-card__title,
.tier-card__name,
.price-card__name {
  margin: 0;
  font-size: 18px;
  font-weight: 850;
}
.feature-card__body,
.tier-card__desc,
.price-card__meta {
  color: var(--pl-muted);
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.feature-card__body { margin: 10px 0 0; }

.tier-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tier-card {
  padding: 24px;
  min-height: 212px;
}
.tier-icon { color: var(--tier-hue); background: color-mix(in srgb, var(--tier-hue) 12%, white); }
.tier-card__badge,
.tier-card__link {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  color: var(--pl-teal);
  font-size: 13px;
  font-weight: 800;
}
.tier-card__link { text-decoration: none; }

.section-padded--trial {
  background: #fff;
}
.trial-policy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}
.trial-policy {
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--pl-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8, 145, 178, 0.08), rgba(255, 255, 255, 0) 56%),
    #fff;
  min-width: 0;
}
.trial-policy h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
}
.trial-policy p {
  margin: 10px 0 0;
  color: var(--pl-muted);
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.pricing-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  min-height: 330px;
}
.price-card--featured {
  border-color: var(--pl-teal);
  box-shadow: 0 20px 54px rgba(15, 118, 110, 0.2);
}
.price-card__ribbon {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--pl-teal);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.price-card__price {
  margin-top: 20px;
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.price-card__amount {
  font-size: 42px;
  font-weight: 950;
  line-height: 1;
}
.price-card__period { color: var(--pl-muted); font-weight: 700; }
.price-card__features {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: var(--pl-muted);
  overflow-wrap: anywhere;
}
.price-card__features li::before {
  content: "✓";
  color: var(--pl-teal);
  font-weight: 900;
  margin-right: 8px;
}
.price-card__cta { margin-top: auto; padding-top: 22px; }

.faq-list {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}
.faq-item {
  padding: 0;
  overflow: hidden;
}
.faq-item__q {
  cursor: pointer;
  padding: 19px 22px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-weight: 850;
}
.faq-item__q::-webkit-details-marker { display: none; }
.faq-item__a {
  padding: 0 22px 20px;
  color: var(--pl-muted);
  line-height: 1.8;
}
.faq-item__a p { margin: 0; }
.faq-item__icon svg {
  width: 18px;
  height: 18px;
}

.bottom-cta {
  padding: 92px 0;
  background: var(--pl-navy);
  color: #fff;
}
.bottom-cta__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}
.bottom-cta__title {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  font-weight: 900;
}
.bottom-cta__sub {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.7);
}
.bottom-cta__btn {
  color: var(--pl-ink);
  background: #fff;
}

.mkt-footer {
  background: #fff;
  border-top: 1px solid var(--pl-line);
  padding: 42px 0;
}
.mkt-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
}
.mkt-footer__wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--pl-ink);
  font-weight: 900;
  text-decoration: none;
}
.mkt-footer__tagline,
.mkt-footer__copy {
  color: var(--pl-muted);
  font-size: 13px;
}
.mkt-footer__copy a {
  color: var(--pl-teal);
  text-decoration: none;
  font-weight: 800;
}
.mkt-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
}
.mkt-footer__links a {
  color: var(--pl-muted);
  font-size: 13px;
  text-decoration: none;
}

.auth-wrap {
  min-height: calc(100vh - 152px);
  display: grid;
  place-items: center;
  padding: 44px 16px;
}
.auth-card {
  width: min(100%, 440px);
  padding: 34px;
  border: 1px solid var(--pl-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--pl-shadow);
}
.auth-card__logo { margin-bottom: 22px; }
.auth-card__logo-mark {
  width: 54px;
  height: 54px;
  border-radius: 11px;
  background: url("/assets/brand/pierlink-mark.svg") center / cover no-repeat;
  font-size: 0;
  box-shadow: 0 12px 30px rgba(8, 145, 178, 0.24);
}
.auth-card__title {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
}
.auth-card__sub,
.auth-card__switch,
.auth-card__forgot,
.field__hint {
  color: var(--pl-muted);
  font-size: 14px;
  line-height: 1.65;
}
.auth-card__sub { margin: 10px 0 22px; }
.auth-card__reassurance {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 14px 0 22px;
  color: var(--pl-teal);
  font-size: 13px;
  font-weight: 800;
}
.auth-card__submit { margin-top: 8px; }
.auth-card__switch,
.auth-card__forgot { text-align: center; margin: 16px 0 0; }
.auth-card__divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  color: var(--pl-muted);
  font-size: 12px;
}
.auth-card__divider::before,
.auth-card__divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--pl-line);
}
.field {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
}
.field__label {
  color: var(--pl-ink);
  font-size: 13px;
  font-weight: 800;
}
.field__label-optional { color: var(--pl-muted); font-weight: 600; }
.field__input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--pl-line);
  border-radius: 7px;
  background: #fff;
  color: var(--pl-ink);
  font: inherit;
  font-size: 15px;
}
.field__input:focus {
  outline: 3px solid rgba(8, 145, 178, 0.16);
  border-color: var(--pl-cyan);
}
.field__input--error { border-color: var(--pl-rose); }
.captcha-slot { margin: 12px 0 16px; }
.auth-card__success-icon,
.auth-card__error-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
}

@media (max-width: 900px) {
  .mkt-nav { display: none; }
  .mkt-bar__hamburger { display: flex; }
  .mkt-bar__actions { display: none; }
  .hero__content { padding-top: 78px; padding-bottom: 96px; }
  .feature-grid,
  .tier-grid,
  .trial-policy-grid,
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom-cta__inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .mkt-bar__inner { height: 62px; padding: 0 16px; }
  .hero { min-height: 650px; }
  .hero__content {
    width: 100%;
    max-width: 100%;
    padding: 72px 16px 118px;
  }
  .hero__title { font-size: 44px; max-width: 100%; }
  .hero__sub,
  .section-sub,
  .feature-card__body,
  .tier-card__desc,
  .trial-policy p,
  .price-card__features,
  .price-card__meta {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .hero__metric { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .hero__cta-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    gap: 12px;
    margin-top: 24px;
    position: relative;
    z-index: 3;
  }
  .hero__cta-primary,
  .hero__cta-secondary {
    width: 100%;
    min-height: 52px;
    padding: 0 12px;
  }
  .hero__cta-secondary {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.38);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .hero__trust { display: none; }
  .container { width: 100%; max-width: 100%; padding-left: 16px; padding-right: 16px; }
  .section-padded { padding: 68px 0; }
  .feature-strip { margin-top: -40px; }
  .feature-grid,
  .tier-grid,
  .trial-policy-grid,
  .pricing-grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }
  .feature-card,
  .tier-card,
  .trial-policy,
  .price-card { width: 100%; max-width: 100%; padding: 20px; }
  .mkt-footer__inner { grid-template-columns: 1fr; }
  .auth-card { padding: 26px 20px; }
}
