/* ============================================================
   PTRDNS home page styles
   ============================================================ */

:root {
  --brand: #1d4ed8;
  --brand-dark: #1e3a8a;
  --brand-2: #0ea5e9;
  --ink: #0f172a;
  --muted: #475569;
  --muted-2: #64748b;
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --success: #0f766e;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 50px rgba(15, 23, 42, 0.12);
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('IBMPlexSans-Regular.woff2') format('woff2'),
  url('IBMPlexSans-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('IBMPlexSans-Italic.woff2') format('woff2'),
  url('IBMPlexSans-Italic.woff') format('woff');
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Cascadia Mono';
  src: url('CascadiaMono-Italic.woff2') format('woff2'),
  url('CascadiaMono-Italic.woff') format('woff');
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Cascadia Mono';
  src: url('CascadiaMono-Regular.woff2') format('woff2'),
  url('CascadiaMono-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1rem; color: var(--muted); }

figure {
  margin-top: 10px;
  margin-bottom: 10px;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: "Cascadia Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: rgba(30, 58, 138, 0.05);
  border: 1px solid rgba(30, 58, 138, 0.1);
  border-radius: 4px;
  padding: 0.1em 0.3em;
  color: var(--brand-dark);
  word-break: break-word;
  vertical-align: baseline;
}

pre {
  background: #1e293b;
  color: #f8fafc;
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-sm);
}

pre code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: 0.88rem;
  line-height: 1.6;
  border-radius: 0;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow { max-width: 820px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.92rem; }

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

.btn-outline {
  background: #fff;
  color: var(--brand);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--brand); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface); }

/* ---------------- Header / nav ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
}
.brand-text strong { color: var(--brand); font-weight: 800; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.primary-nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.97rem;
}
.primary-nav a:hover { color: var(--ink); text-decoration: none; }
.primary-nav a.btn { color: #fff; }
.primary-nav a.btn:hover { color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- Hero ---------------- */
.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(14, 165, 233, 0.18), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(29, 78, 216, 0.12), transparent 55%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  padding: 84px 0 64px;
}
.hero-content {
  text-align: center;
}
.hero-copy {
  margin: 0 auto;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 0.75rem;
}
.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  font-weight: 800;
  margin-bottom: 1rem;
}
.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin: 1.6rem 0 0.9rem;
}
.hero-note { font-size: 0.9rem; color: var(--muted-2); margin: 0 0 3rem; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.stat-num {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
}
.stat-num.stat-text { font-size: 1.5rem; }
.stat-label {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

/* ---------------- Trust bar ---------------- */
.trust-bar {
  background: var(--ink);
  color: #cbd5e1;
}
.trust-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem 1.2rem;
  padding: 16px 24px;
  font-size: 0.92rem;
  font-weight: 500;
  text-align: center;
}
.trust-bar-inner span[aria-hidden] { color: var(--brand-2); }

/* ---------------- Sections ---------------- */
.section { padding: 76px 0; }
.section-alt { background: var(--surface); }

.section-head {
  max-width: 720px;
  margin: 0 auto 42px;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  font-weight: 800;
}
.section-sub {
  font-size: 1.08rem;
  color: var(--muted);
}
.architecture-list {
  margin: 18px 0 0;
  padding-left: 1.4rem;
  text-align: left;
  display: grid;
  gap: 10px;
}
.architecture-list li { padding-left: 0.25rem; }
.architecture-list strong { color: var(--ink); }

/* ---------------- Grids & cards ---------------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cdd8ea;
}
.card h3 { font-size: 1.2rem; }
.card p { margin: 0; }
.card-icon {
  font-size: 1.6rem;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border-radius: 12px;
  margin-bottom: 14px;
}

.features .card h3,
.use-case h3 {
  color: var(--brand-dark);
}

/* ---------------- Who it's for ---------------- */
.who-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
}
.who-copy .section-sub { text-align: left; }
.who-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.who-list li {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: 10px;
  padding: 16px 18px;
  color: var(--muted);
}
.who-list strong { color: var(--ink); display: inline; }

/* ---------------- Architecture diagram ---------------- */
.diagram {
  margin: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.diagram svg { width: 100%; height: auto; display: block; }
.d-title { font: 600 15px "Inter", sans-serif; fill: var(--ink); }
.d-sub { font: 400 11.5px "Inter", sans-serif; fill: var(--muted-2); }
.d-core-title { font: 800 22px "Inter", sans-serif; fill: #fff; }
.d-core-sub { font: 500 12.5px "Inter", sans-serif; fill: rgba(255,255,255,0.92); }
.diagram-caption {
  margin-top: 18px;
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------------- Screenshots ---------------- */
.screenshot {
  margin-top: 10px;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

/* ---------------- Trust signals ---------------- */
.trust-grid { gap: 24px; }
.trust-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
}
.trust-panel h3 {
  font-size: 1.15rem;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
  font-size: 0.98rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 16px;
  height: 9px;
  border-left: 2.5px solid var(--success);
  border-bottom: 2.5px solid var(--success);
  transform: rotate(-45deg);
}

/* ---------------- Pricing ---------------- */
.billing-toggle {
  display: inline-flex;
  gap: 4px;
  margin: 0 auto 36px;
  padding: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.billing-btn {
  border: 0;
  background: transparent;
  padding: 0.5rem 1.3rem;
  border-radius: 999px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.billing-btn.is-active {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: var(--shadow-sm);
}

.price-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
}
.price-card.is-featured {
  border-color: var(--brand);
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}
.badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}
.price-card h3 { font-size: 1.35rem; }
.price {
  margin: 0.2rem 0 0.4rem;
  color: var(--ink);
}
.price .amount { font-size: 2.6rem; font-weight: 800; }
.price .period { font-size: 1rem; color: var(--muted-2); font-weight: 500; }
.price-desc { font-size: 0.96rem; min-height: 3em; }
.price-card .check-list { margin: 0.4rem 0 1.6rem; }
.price-card .btn { margin-top: auto; width: 100%; }

/* ---------------- Tables ---------------- */
.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-container--centered {
  display: flex;
  justify-content: center;
}

table {
  width: 100%;
  min-width: 34rem;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--muted);
  font-size: 0.96rem;
  text-align: left;
}

th,
td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

thead th:first-child { border-top-left-radius: 10px; }
thead th:last-child { border-top-right-radius: 10px; }
tbody tr:nth-child(even) { background: var(--surface); }
tbody tr:hover { background: #eef4ff; }
tbody tr:last-child td { border-bottom: 0; }

.table-container--centered table {
  width: max-content;
  min-width: min(100%, 34rem);
}

/* ---------------- FAQ ---------------- */
.faq { display: grid; gap: 12px; }
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 6px;
  box-shadow: var(--shadow-sm);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 44px 16px 18px;
  font-weight: 600;
  color: var(--ink);
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--brand);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: "\2013"; }
.faq-body { padding: 0 18px 16px; }
.faq-body p { margin: 0; }

/* ---------------- CTA ---------------- */
.cta {
  background:
    radial-gradient(800px 400px at 100% 0%, rgba(14, 165, 233, 0.35), transparent 60%),
    linear-gradient(120deg, var(--brand-dark), var(--brand));
  color: #fff;
  padding: 72px 0;
}
.cta-inner { text-align: center; max-width: 760px; }
.cta h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.cta p { color: rgba(255, 255, 255, 0.9); font-size: 1.1rem; }
.cta .hero-cta { justify-content: center; }
.cta .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.cta .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.cta .btn-primary { background: #fff; color: var(--brand-dark); }
.cta .btn-primary:hover { background: #eef2ff; }

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--ink);
  color: #94a3b8;
  padding: 56px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand .brand { color: #fff; }
.footer-brand .brand-text strong { color: var(--brand-2); }
.footer-brand p { color: #94a3b8; margin-top: 0.6rem; }
.footer-col h4 {
  color: #e2e8f0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: #94a3b8; font-size: 0.96rem; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 0.88rem;
}
.footer-bottom p { margin: 0; color: #94a3b8; }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .lead { max-width: none; }
  .who-grid { grid-template-columns: 1fr; gap: 28px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .hero-stats { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 8px 24px 20px;
    display: none;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a {
    padding: 12px 4px;
    border-bottom: 1px solid var(--surface-2);
  }
  .primary-nav a.btn { margin-top: 12px; text-align: center; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .price-card.is-featured { transform: none; }
  .section { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------------- Motion preferences ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
