/*
Theme Name: The PORT
Theme URI: https://theport.one/
Author: Urmas
Author URI: https://theport.one/
Description: Marketing theme for theport.one — sister theme of TheCRM and The BOOKS (same navy visual system). Light + dark mode.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: theport
Tags: business, one-column, custom-menu, custom-logo, full-width-template, sticky-post, footer-widgets
*/

/* ─── Reset & tokens ──────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
  --bg:        #FAFAF7;
  --surface:   #FFFFFF;
  --surface-2: #EEF1F5;
  --text:      #15202B;
  --muted:     #5B6A78;
  --border:    #DEE4EB;
  --primary:   #1E3D5C;
  --primary-h: #142C45;
  --primary-soft: #E5EDF4;
  --accent:    #C8A24A;
  --shadow-sm: 0 1px 2px rgba(20,30,50,0.04);
  --shadow:    0 6px 24px rgba(20,30,50,0.07), 0 1px 2px rgba(20,30,50,0.04);
  --shadow-lg: 0 24px 60px rgba(20,30,50,0.10), 0 8px 20px rgba(20,30,50,0.06);
  --radius:    12px;
  --radius-lg: 18px;
  --container: 1140px;
}

[data-theme="dark"] {
  --bg:        #0F1620;
  --surface:   #18222E;
  --surface-2: #1F2C3B;
  --text:      #ECEEEA;
  --muted:     #94A3B5;
  --border:    #2A3949;
  --primary:   #7BA8D2;
  --primary-h: #95BCDF;
  --primary-soft: #1A2B3F;
  --accent:    #D9B86A;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow:    0 6px 24px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.5), 0 8px 20px rgba(0,0,0,0.3);
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: 'cv11','ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .25s ease, color .25s ease;
}

/* ─── Typography ─────────────────────────────────────────────────── */
h1, h2, h3, h4 { margin: 0 0 .4em; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(2.4rem, 5.5vw, 3.8rem); letter-spacing: -0.035em; line-height: 1.05; }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.6rem); letter-spacing: -0.03em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; color: var(--text); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--surface-2); padding: 1px 6px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }

.muted { color: var(--muted); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: .72rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: .8em;
}

/* ─── Layout ─────────────────────────────────────────────────────── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.tcrm-section { padding: clamp(56px, 9vw, 110px) 0; }
.section-header { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-header p { color: var(--muted); font-size: 1.1rem; }

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease;
  white-space: nowrap;
  font-family: inherit;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--primary-h); transform: translateY(-1px); box-shadow: var(--shadow); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-lg { padding: 16px 26px; font-size: 1.05rem; }

/* ─── Top nav ─────────────────────────────────────────────────────── */
.tcrm-nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.brand { display: flex; align-items: center; color: var(--text); }
.brand:hover { text-decoration: none; color: var(--text); }
.brand img, .brand .custom-logo { height: 36px; width: auto; display: block; }
[data-theme="dark"] .brand img,
[data-theme="dark"] .brand .custom-logo { filter: invert(1) hue-rotate(180deg) brightness(1.05); }
/* Legacy fallback brand mark (only used when no logo image is present) */
.brand-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), color-mix(in oklab, var(--primary) 60%, var(--accent)));
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 13px;
  letter-spacing: -.05em;
  margin-right: 10px;
}
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; padding: 0; margin: 0; }
.nav-links > li { position: relative; }
.nav-links a { color: var(--muted); font-size: .95rem; font-weight: 500; padding: 8px 0; display: inline-block; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links .current-menu-item > a,
.nav-links .current-menu-parent > a { color: var(--text); }

/* Submenu (dropdown) — appears when a top-level item has children */
.nav-links .sub-menu,
.nav-links ul.sub-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: -16px;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  list-style: none;
  margin: 0;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, visibility 0s .15s;
  z-index: 60;
}
.nav-links li:hover > .sub-menu,
.nav-links li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .15s ease, transform .15s ease, visibility 0s 0s;
}
.nav-links .sub-menu li { display: block; }
.nav-links .sub-menu a {
  display: block;
  padding: 9px 14px;
  border-radius: 6px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}
.nav-links .sub-menu a:hover { background: var(--surface-2); color: var(--text); }
/* Chevron next to top-level items that have a submenu */
.nav-links .menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 0; height: 0;
  margin-left: 6px;
  vertical-align: middle;
  border: 4px solid transparent;
  border-top-color: currentColor;
  transition: transform .15s ease;
}
.nav-links .menu-item-has-children:hover > a::after { transform: translateY(1px); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
/* Nav secondary CTA ("Download trial") — hide on narrow screens, keep primary */
@media (max-width: 540px) { .nav-cta-secondary { display: none; } }
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: grid; place-items: center;
  color: var(--muted);
  transition: background .2s ease;
}
.theme-toggle:hover { background: var(--surface-2); color: var(--text); }
.theme-toggle svg { width: 16px; height: 16px; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun  { display: none; }
[data-theme="dark"]  .theme-toggle .icon-moon { display: none; }
[data-theme="dark"]  .theme-toggle .icon-sun  { display: block; }

@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* ─── Pain-point cards (homepage "Sound familiar?" section) ──────── */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  max-width: 1000px;
  margin: 0 auto;
}
.pain-card {
  text-align: center;
  padding: 36px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.pain-card .pain-icon {
  font-size: 2.2rem;
  display: block;
  margin: 0 auto 12px;
  line-height: 1;
}
.pain-card h3 {
  font-size: 1.1rem;
  margin: 0 0 .5em;
  letter-spacing: -.015em;
}
.pain-card p { color: var(--muted); font-size: .96rem; margin: 0; }
@media (max-width: 760px) { .pain-grid { grid-template-columns: 1fr; } }

/* ─── Trust 2-column callout ("Most CRMs" vs "TheCRM") ──────────── */
.trust-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-width: 920px;
  margin: 0 auto;
}
.trust-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
}
.trust-col.ours {
  background: var(--primary-soft);
  border-color: color-mix(in oklab, var(--primary) 20%, var(--border));
}
.trust-col h4 {
  font-size: 1rem;
  margin: 0 0 20px;
  letter-spacing: -.01em;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
}
.trust-col.ours h4 { color: var(--primary); }
.trust-col ul { list-style: none; padding: 0; margin: 0; }
.trust-col li {
  padding: 10px 0;
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .98rem;
  color: var(--text);
  border-bottom: 1px solid color-mix(in oklab, var(--border) 50%, transparent);
}
.trust-col li:last-child { border-bottom: 0; }
.trust-col li::before {
  content: "✗";
  color: #B91C1C;
  font-weight: 600;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}
.trust-col.ours li::before {
  content: "✓";
  color: var(--primary);
}
@media (max-width: 760px) { .trust-cols { grid-template-columns: 1fr; } }

/* ─── How it works (4 numbered steps) ───────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.step {
  position: relative;
  padding: 28px 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.step .step-num {
  position: absolute;
  top: -14px;
  left: 22px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  display: grid; place-items: center;
  font-size: .95rem;
  box-shadow: var(--shadow-sm);
}
.step h4 {
  font-size: 1rem;
  margin: 10px 0 .5em;
  letter-spacing: -.01em;
}
.step p { color: var(--muted); font-size: .92rem; margin: 0; }
@media (max-width: 880px) { .steps-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .steps-grid { grid-template-columns: 1fr; } }

/* ─── Beta badge (used on hero + beta signup card) ──────────────── */
.beta-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  margin-bottom: 18px;
}
.beta-badge::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 30%, transparent);
}

/* ─── Founder section ────────────────────────────────────────────── */
.founder-section { background: var(--surface-2); }
.founder-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 44px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 48px;
  box-shadow: var(--shadow);
  max-width: 920px; margin: 0 auto;
}
.founder-photo {
  width: 220px; height: 220px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--primary-soft);
}
.founder-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}
.founder-photo::after {
  content: "🇪🇪";
  position: absolute;
  bottom: -2px; right: 4px;
  width: 44px; height: 44px;
  background: var(--surface);
  border: 3px solid var(--bg);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.4rem;
  z-index: 2;
}
.founder-text h2 { font-size: 1.55rem; line-height: 1.2; letter-spacing: -.025em; margin: .2em 0 .6em; }
.founder-text p { color: var(--muted); font-size: 1rem; line-height: 1.6; margin: 0 0 1em; }
.founder-text p:last-child { margin: 0; }
.founder-text strong { color: var(--text); }
@media (max-width: 760px) {
  .founder-card { grid-template-columns: 1fr; text-align: center; padding: 36px 28px; }
  .founder-photo { margin: 0 auto; width: 160px; height: 160px; }
  .founder-photo::after { width: 36px; height: 36px; font-size: 1.2rem; }
}

/* ─── Beta signup section (replaces pricing in beta phase) ───────── */
.beta-section {
  background: linear-gradient(180deg, var(--bg), var(--primary-soft));
  padding: 80px 0 100px;
}
.beta-card {
  max-width: 580px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 40px 40px;
  text-align: center;
  box-shadow: var(--shadow);
}
.beta-card .beta-badge { margin-bottom: 18px; }
.beta-card h2 { font-size: 1.85rem; margin: 0 0 .35em; letter-spacing: -.025em; }
.beta-card > p { color: var(--muted); font-size: 1.05rem; line-height: 1.55; margin: 0 0 28px; }
.beta-perks {
  list-style: none; padding: 0;
  margin: 0 0 28px;
  text-align: left;
  font-size: .96rem;
}
.beta-perks li {
  padding: 8px 0;
  display: flex; align-items: flex-start; gap: 12px;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 50%, transparent);
}
.beta-perks li:last-child { border-bottom: 0; }
.beta-perks svg {
  color: var(--primary);
  flex-shrink: 0;
  width: 16px; height: 16px;
  margin-top: 4px;
}
.beta-form { display: flex; gap: 8px; margin-top: 4px; }
.beta-form input[type="email"] {
  flex: 1;
  font-family: inherit;
  font-size: 1rem;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color .15s ease;
}
.beta-form input[type="email"]:focus { border-color: var(--primary); }
.beta-form .btn { padding-left: 18px; padding-right: 18px; }
.beta-note { color: var(--muted); font-size: .85rem; margin-top: 14px; }
.beta-thanks {
  text-align: center;
  padding: 24px 12px;
  background: var(--primary-soft);
  border-radius: 10px;
}
.beta-thanks .title { margin: 0 0 6px; font-size: 1.1rem; font-weight: 600; color: var(--primary); }
.beta-thanks .body { margin: 0; color: var(--muted); font-size: .95rem; }
.beta-thanks .body strong { color: var(--text); }
@media (max-width: 540px) {
  .beta-form { flex-direction: column; }
  .beta-form .btn { width: 100%; justify-content: center; }
}

/* ─── Hero ───────────────────────────────────────────────────────── */
.hero { padding-top: 80px; padding-bottom: 40px; text-align: center; }
.hero h1 { max-width: 18ch; margin: 0 auto .35em; }
.hero .lead { font-size: 1.18rem; color: var(--muted); max-width: 58ch; margin: 0 auto 32px; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.hero-meta { color: var(--muted); font-size: .9rem; }
.hero-meta .sep { color: var(--border); margin: 0 8px; }

/* ─── App mockup window ──────────────────────────────────────────── */
.mockup-wrap {
  margin-top: 64px;
  position: relative;
  padding: 0 16px;
}
.mockup {
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  transform: perspective(2000px) rotateX(0.5deg);
}
/* User-uploaded hero image (via Customizer or assets/hero.png).
   Takes the same shape, shadow, and tilt as the faux mockup. */
.hero-image {
  max-width: 1100px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: perspective(2000px) rotateX(0.5deg);
}
.mockup-titlebar {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 14px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--border);
}
.tdot { width: 12px; height: 12px; border-radius: 50%; }
.tdot.r { background: #FF5F57; }
.tdot.y { background: #FEBC2E; }
.tdot.g { background: #28C840; }
.titlebar-title {
  flex: 1; text-align: center;
  font-size: .85rem; color: var(--muted); font-weight: 500;
  margin-right: 54px;
}
.mockup-body { display: grid; grid-template-columns: 200px 1fr; min-height: 520px; }

/* ─── Sidebar (matches real app: single list, Deals active) ─── */
.tcrm-sidebar {
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  padding: 10px 10px;
  font-size: .88rem;
}
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--text);
  cursor: default;
  font-weight: 500;
}
.sidebar-item.active { background: var(--primary); color: #fff; }
.sidebar-item .ico {
  width: 14px; height: 14px;
  border-radius: 3px;
  background: currentColor; opacity: .5;
  flex-shrink: 0;
}
.sidebar-item.active .ico { opacity: .95; }

/* ─── Pipeline wrapper (toolbar + columns) ─── */
.pipeline-wrap { background: var(--bg); display: flex; flex-direction: column; }
.pipeline-toolbar {
  padding: 14px 20px 10px;
  display: flex; align-items: center; gap: 20px;
  font-size: .9rem;
  color: var(--muted);
}
.pipeline-title { font-weight: 600; font-size: 1rem; color: var(--text); }
.pipeline-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: .82rem;
  color: var(--muted);
}
.pipeline-select strong { color: var(--text); font-weight: 500; }

/* ─── Columns ─── */
.pipeline {
  padding: 6px 18px 20px;
  overflow-x: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
}
.col {
  display: flex; flex-direction: column;
  gap: 10px;
  min-width: 220px;
  background: color-mix(in oklab, var(--surface-2) 50%, transparent);
  border-radius: 10px;
  padding: 10px 10px 12px;
}
.col-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 4px 2px;
  font-size: .82rem; font-weight: 600;
  color: var(--text);
}
.col-title { display: flex; align-items: center; gap: 8px; }
.col-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.col-count { color: var(--muted); font-weight: 400; font-size: .8rem; }
.col-total {
  padding: 0 4px 10px;
  color: var(--muted);
  font-size: .78rem;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  margin-bottom: 4px;
}

.deal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px 10px;
  box-shadow: var(--shadow-sm);
  font-size: .82rem;
  display: flex; flex-direction: column; gap: 2px;
}
.deal-name { font-weight: 600; color: var(--text); line-height: 1.3; }
.deal-amount {
  font-weight: 600; color: var(--text);
  font-size: .95rem; line-height: 1.3;
  margin-bottom: 4px;
}
.deal-contact { color: var(--muted); font-size: .76rem; }
.deal-date {
  color: color-mix(in oklab, var(--muted) 70%, transparent);
  font-size: .72rem;
  margin-top: 4px;
}

.col-add {
  margin-top: 2px;
  padding: 8px 10px;
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
  cursor: default;
}

@media (max-width: 760px) {
  .mockup-body { grid-template-columns: 1fr; }
  .tcrm-sidebar { display: none; }
  .pipeline { grid-template-columns: repeat(4, 240px); }
}

/* ─── Why cards ──────────────────────────────────────────────────── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
}
.card .ico-circle {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid; place-items: center;
  margin-bottom: 14px;
  font-weight: 700;
}
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }

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

/* ─── Feature tiles ──────────────────────────────────────────────── */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px;
  display: flex; flex-direction: column; gap: 6px;
}
.tile .ico-circle {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid; place-items: center;
  margin-bottom: 12px;
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}
.tile h4 { font-size: 1rem; margin: 0; }
.tile p { font-size: .92rem; color: var(--muted); margin: 0; }

@media (max-width: 880px) {
  .feat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .feat-grid { grid-template-columns: 1fr; }
}
.feat-cta { text-align: center; }
.feat-cta a { font-weight: 600; }

/* ─── Comparison table ───────────────────────────────────────────── */
.compare-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.compare-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.compare-table th, .compare-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.compare-table thead th {
  font-weight: 600;
  color: var(--muted);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: var(--surface-2);
}
.compare-table thead th.us {
  color: var(--primary);
  background: var(--primary-soft);
}
.compare-table tbody td:first-child { color: var(--muted); font-weight: 500; }
.compare-table tbody td.us {
  font-weight: 600;
  background: color-mix(in oklab, var(--primary-soft) 60%, transparent);
  color: var(--text);
}
.compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table tbody tr:hover td { background: color-mix(in oklab, var(--surface-2) 60%, transparent); }
.compare-table tbody tr:hover td.us { background: var(--primary-soft); }

.compare-quote {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--text);
  margin: 36px auto 0;
  max-width: 640px;
  line-height: 1.4;
}
.compare-quote::before, .compare-quote::after {
  content: '"';
  color: var(--primary);
  font-size: 1.4em;
  vertical-align: -0.15em;
  margin: 0 6px;
}

@media (max-width: 760px) {
  .compare-wrap { overflow-x: auto; }
  .compare-table { min-width: 720px; }
}

/* ─── Pricing card ───────────────────────────────────────────────── */
.pricing-section { background: var(--surface-2); }
.pricing-card {
  max-width: 520px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 40px 36px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
}
.price {
  font-size: 4.2rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--text);
  margin: 0 0 6px;
}
.price-meta { color: var(--muted); margin-bottom: 28px; font-size: 1rem; }
.price-list {
  list-style: none; padding: 0; margin: 0 0 28px;
  text-align: left;
  font-size: .96rem;
}
.price-list li {
  padding: 8px 0;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 50%, transparent);
}
.price-list li:last-child { border-bottom: 0; }
.check {
  color: var(--primary);
  flex-shrink: 0;
  width: 16px; height: 16px;
}

/* ─── FAQ ────────────────────────────────────────────────────────── */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 12px;
  transition: box-shadow .2s ease;
}
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 1.02rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--muted);
  transition: transform .2s ease;
}
.faq details[open] summary::after { content: "−"; color: var(--primary); }
.faq .answer { padding: 0 22px 20px; color: var(--muted); }
.faq .answer p:last-child { margin-bottom: 0; }

/* ─── Final CTA ──────────────────────────────────────────────────── */
.cta-final {
  text-align: center;
  background: linear-gradient(180deg, var(--bg), var(--surface-2));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-final h2 { letter-spacing: -.035em; max-width: 18ch; margin: 0 auto .35em; }
.cta-final p { color: var(--muted); font-size: 1.1rem; max-width: 50ch; margin: 0 auto 28px; }

/* ─── Footer ─────────────────────────────────────────────────────── */
.tcrm-footer {
  padding: 56px 0 64px;
  font-size: .9rem;
  color: var(--muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-grid h5 {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text);
  margin: 0 0 14px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-grid a { color: var(--muted); }
.footer-grid a:hover { color: var(--text); text-decoration: none; }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer-legal {
  margin: 18px 0 0;
  padding-top: 18px;
  border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.6;
}
.footer-legal a { color: var(--muted); text-decoration: underline; }
.footer-legal a:hover { color: var(--text); }

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

/* ─── Generic page template (for /about, /pricing, /privacy, etc.) ─ */
.tcrm-page {
  padding: 64px 0 100px;
}
.tcrm-page .post-title {
  text-align: center;
  margin: 0 auto 56px;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  letter-spacing: -.035em;
  line-height: 1.08;
  max-width: 22ch;
}
.tcrm-page .entry-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.06rem;
  line-height: 1.7;
}
.tcrm-page .entry-content > * + * {
  margin-top: 1.1em;
}
/* Lead paragraph — first paragraph after the H1 gets larger, lighter weight */
.tcrm-page .entry-content > p:first-of-type {
  font-size: 1.32rem;
  line-height: 1.45;
  letter-spacing: -.01em;
  color: var(--text);
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 1em;
  text-align: center;
}
/* Second paragraph — slight lead style as well, smaller and centered */
.tcrm-page .entry-content > p:first-of-type + p {
  font-size: 1.15rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0;
  margin-bottom: 2.2em;
}

.tcrm-page .entry-content h2 {
  margin-top: 2.8em;
  margin-bottom: .5em;
  font-size: 1.6rem;
  letter-spacing: -.02em;
  position: relative;
  padding-top: 1.4em;
}
.tcrm-page .entry-content h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 48px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  opacity: .8;
}
.tcrm-page .entry-content h3 {
  margin-top: 1.8em;
  margin-bottom: .35em;
  font-size: 1.18rem;
}
.tcrm-page .entry-content p { margin: 0; color: var(--text); }
.tcrm-page .entry-content strong { color: var(--text); font-weight: 600; }

.tcrm-page .entry-content blockquote {
  border-left: 3px solid var(--primary);
  margin: 1.8em 0;
  padding: .6em 0 .6em 1.4em;
  font-size: 1.18rem;
  font-style: italic;
  color: var(--text);
  background: linear-gradient(90deg, var(--primary-soft), transparent 60%);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.tcrm-page .entry-content blockquote p { margin: 0; }
.tcrm-page .entry-content blockquote p + p { margin-top: .6em; }

.tcrm-page .entry-content ul,
.tcrm-page .entry-content ol {
  padding-left: 1.4em;
  margin: 0;
}
.tcrm-page .entry-content li + li { margin-top: .35em; }
.tcrm-page .entry-content li::marker { color: var(--primary); }

.tcrm-page .entry-content hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.6em auto;
  max-width: 220px;
}

.tcrm-page .entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: .95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.tcrm-page .entry-content thead th {
  background: var(--surface-2);
  font-weight: 600;
  color: var(--muted);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.tcrm-page .entry-content tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.tcrm-page .entry-content tbody tr:last-child td { border-bottom: 0; }
.tcrm-page .entry-content tbody tr:hover td {
  background: color-mix(in oklab, var(--surface-2) 50%, transparent);
}

.tcrm-page .entry-content a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.tcrm-page .entry-content a:hover { text-decoration-thickness: 2px; }

.tcrm-page .entry-content code {
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .92em;
}
.tcrm-page .entry-content pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
  margin: 1.6em 0;
  font-size: .92rem;
  line-height: 1.55;
}
.tcrm-page .entry-content pre code { background: transparent; padding: 0; }
.tcrm-page .entry-content img,
.tcrm-page .entry-content figure img {
  border-radius: var(--radius);
  margin: 1.6em 0;
}

/* "Check / cross" lists — when a paragraph has only ✓ ✗ items they look like
   pseudo-bullets. Style them as proper inclusion / exclusion rows. */
.tcrm-page .entry-content p:has(> :not(br)) ~ p {
  /* no-op safety, just here so editor sees the rule exists */
}

/* ─── Blog archive (index.php) ───────────────────────────────────── */
.blog-archive {
  padding: 80px 0 100px;
}
.blog-archive .archive-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.blog-archive .archive-header h1 {
  margin-bottom: .25em;
}
.blog-archive .archive-header p {
  color: var(--muted);
  font-size: 1.1rem;
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 980px;
  margin: 0 auto;
}
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 26px;
  display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .2s ease;
}
.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.post-card .post-date {
  color: var(--muted);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 8px;
}
.post-card h2 {
  font-size: 1.35rem;
  margin: 0 0 .4em;
  line-height: 1.25;
}
.post-card h2 a {
  color: var(--text);
}
.post-card h2 a:hover {
  color: var(--primary);
  text-decoration: none;
}
.post-card .excerpt {
  color: var(--muted);
  font-size: .96rem;
  margin: 0 0 16px;
  flex: 1;
}
.post-card .read-more {
  font-weight: 600;
  font-size: .92rem;
  color: var(--primary);
  margin-top: auto;
}
.post-card .read-more:hover { text-decoration: none; }
.post-card .read-more::after { content: " →"; }

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

/* Pagination */
.posts-pagination {
  margin-top: 56px;
  text-align: center;
}
.posts-pagination .nav-links {
  display: inline-flex;
  gap: 6px;
  list-style: none;
  padding: 0;
}
.posts-pagination a, .posts-pagination .current {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  font-size: .9rem;
  background: var(--surface);
}
.posts-pagination a:hover { background: var(--surface-2); text-decoration: none; }
.posts-pagination .current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ─── Single post template (single.php) ──────────────────────────── */
.single-post-wrap {
  padding: 64px 0 96px;
}
.single-post-wrap article {
  max-width: 720px;
  margin: 0 auto;
}
.single-post-meta {
  text-align: center;
  margin-bottom: 28px;
}
.single-post-meta .post-date {
  color: var(--muted);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 8px;
}
.single-post-meta h1 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  letter-spacing: -.03em;
  line-height: 1.1;
  margin: 0 0 .4em;
}
.single-post-meta .author {
  color: var(--muted);
  font-size: .95rem;
}
.single-post-content {
  font-size: 1.08rem;
  line-height: 1.7;
}
.single-post-content > * + * { margin-top: 1.1em; }
.single-post-content h2 {
  font-size: 1.6rem;
  margin-top: 2em;
  margin-bottom: .5em;
}
.single-post-content h3 {
  font-size: 1.25rem;
  margin-top: 1.6em;
  margin-bottom: .4em;
}
.single-post-content p {
  margin: 0;
}
.single-post-content blockquote {
  border-left: 3px solid var(--primary);
  padding: .25em 0 .25em 1.2em;
  margin: 1.4em 0;
  color: var(--muted);
  font-style: italic;
  font-size: 1.1rem;
}
.single-post-content code {
  font-size: .94em;
}
.single-post-content pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .92rem;
  line-height: 1.55;
}
.single-post-content pre code { background: transparent; padding: 0; }
.single-post-content img,
.single-post-content figure img {
  border-radius: var(--radius);
  margin: 1.5em 0;
}
.single-post-content ul, .single-post-content ol {
  padding-left: 1.4em;
}
.single-post-content li + li { margin-top: .35em; }
.single-post-content hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5em auto;
  max-width: 240px;
}
.post-cta {
  margin-top: 64px;
  padding: 28px 32px;
  background: var(--primary-soft);
  border-radius: var(--radius-lg);
  text-align: center;
}
.post-cta p { margin: 0 0 14px; color: var(--text); font-weight: 500; }

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: .9rem;
}
.post-nav a {
  color: var(--muted);
  display: flex; flex-direction: column; gap: 2px;
  max-width: 45%;
}
.post-nav a:hover { color: var(--text); text-decoration: none; }
.post-nav .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }
.post-nav .next { text-align: right; margin-left: auto; }

/* ─── Utility ────────────────────────────────────────────────────── */
.center { text-align: center; }
.screen-reader-text { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }

/* ═══════════════════════════════════════════════════════════════════
   The PORT — product-specific additions (theport-* prefix)
   ═══════════════════════════════════════════════════════════════════ */

/* Text wordmark (used until a logo image is uploaded) */
.brand-text { gap: 0; font-size: 1.12rem; letter-spacing: -.02em; white-space: nowrap; }
.brand-text .brand-word { font-weight: 500; color: var(--text); }
.brand-text .brand-word strong { font-weight: 700; letter-spacing: .02em; }
.tcrm-footer .brand-text { font-size: 1.05rem; }

/* Hero eyebrow centred */
.hero .eyebrow { text-align: center; }

/* Feature pillars */
.theport-pillar {
  font-size: .78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .15em;
  color: var(--muted);
  margin: 0 0 14px;
}
.theport-pillar + .feat-grid { margin-bottom: 40px; }
#features .feat-grid:last-of-type { margin-bottom: 0; }

.theport-footnote {
  text-align: center; color: var(--muted);
  font-size: .82rem; max-width: 70ch; margin: 18px auto 0;
}

/* ─── Studio mockup ─── */
.theport-side-label {
  font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted);
  padding: 12px 10px 6px;
}
.theport-side-label:first-child { padding-top: 4px; }
.theport-ws {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; border-radius: 7px;
  font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.theport-ws.active { background: var(--primary-soft); }
.ws-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

.theport-studio {
  background: var(--bg);
  padding: 18px 20px 22px;
  display: flex; flex-direction: column; gap: 16px;
  text-align: left;
  min-width: 0;
}
.theport-brief {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.theport-brief-label {
  font-size: .7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .12em; color: var(--muted); margin-bottom: 6px;
}
.theport-brief p { margin: 0 0 12px; font-size: .92rem; color: var(--text); line-height: 1.45; }
.theport-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: .76rem; font-weight: 500;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted); background: var(--surface);
}
.chip.on { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.chip.gen { margin-left: auto; background: var(--primary); color: #fff; border-color: transparent; font-weight: 600; }
[data-theme="dark"] .chip.gen { color: #0F1620; }

.theport-posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.theport-post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  font-size: .82rem; line-height: 1.45;
  display: flex; flex-direction: column;
}
.theport-post header {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 8px; margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.theport-post header strong { font-size: .86rem; color: var(--text); }
.theport-post header span { font-size: .72rem; color: var(--muted); font-family: 'JetBrains Mono', ui-monospace, monospace; }
.theport-post p { margin: 0 0 8px; color: var(--text); }
.theport-post p.dim, .theport-post .dim { color: var(--muted); }
.theport-post p.tags { color: var(--primary); font-size: .78rem; }
.theport-post footer {
  margin-top: auto; padding-top: 8px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .74rem;
}
.theport-post .ok {
  color: #2E7D4F; background: color-mix(in oklab, #2E7D4F 14%, transparent);
  padding: 2px 8px; border-radius: 999px; font-weight: 600;
}
[data-theme="dark"] .theport-post .ok { color: #7BD3A0; }

@media (max-width: 880px) {
  .theport-posts { grid-template-columns: 1fr 1fr; }
  .theport-posts .theport-post:nth-child(3) { display: none; }
}
@media (max-width: 540px) {
  .theport-posts { grid-template-columns: 1fr; }
  .theport-posts .theport-post:nth-child(2) { display: none; }
  .chip.gen { margin-left: 0; }
}

/* ─── Download page ─── */
.theport-dl-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  max-width: 760px; margin: 0 auto;
}
.theport-dl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.theport-dl-card h3 { margin: 0 0 .3em; }
.theport-dl-card p { color: var(--muted); font-size: .92rem; margin: 0 0 18px; }
.theport-dl-card .btn { width: 100%; justify-content: center; }
.theport-dl-card .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
@media (max-width: 540px) { .theport-dl-grid { grid-template-columns: 1fr; } }

/* Narrow prose blocks on dedicated pages */
.theport-prose { max-width: 720px; margin: 0 auto; }
.theport-prose h2 { font-size: 1.6rem; letter-spacing: -.025em; margin: 1.8em 0 .5em; }
.theport-prose h2:first-child { margin-top: 0; }
.theport-prose ol, .theport-prose ul { padding-left: 1.3em; }
.theport-prose li + li { margin-top: .4em; }
.theport-prose code {
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .86em;
  background: var(--surface-2); padding: 2px 6px; border-radius: 5px;
}
