/*
Theme Name: TN Software
Theme URI: https://tnsaas.com
Author: TN Solutions
Description: Catalog theme for tnsaas.com. Tokens in theme.json. No parent.
Version: 1.6.4
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: tnsoftware
*/

@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/ibm-plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/ibm-plex-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F5FBFF;
  --hero: #D4F0FF;
  --bg-soft: #E8F6FF;
  --bg-card: #FFFFFF;
  --ink: #12344A;
  --muted: #3E6478;
  --line: #BFDCF0;
  --accent: #1A7AE0;
  --accent-hover: #125EBE;
  --on-accent: #FFFFFF;
  --ok: #0E9A4A;
  --ok-bg: #DFF8E9;
  --wait: #D4890A;
  --wait-bg: #FFF5DC;
  --mint: #20C4B0;
  --footer: #0A3D66;
  --elevate: 0 22px 50px rgba(18, 90, 150, 0.12);
  --elevate-lg: 0 32px 80px rgba(18, 90, 150, 0.16);
  --radius: 10px;
  --header-h: 80px;
  --space: 8px;
  --content: 1120px;
  --prose: 640px;
  --gutter: 24px;
  --font: "IBM Plex Sans", ui-sans-serif, system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", "Segoe UI Mono", Menlo, monospace;
}

@media (min-width: 1120px) {
  :root { --gutter: 32px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: 8px 16px;
  z-index: 100;
}

.skip-link:focus { left: 16px; top: 8px; }

.wrap {
  width: min(var(--content), calc(100% - 2 * var(--gutter)));
  margin-left: auto;
  margin-right: auto;
}

.prose { max-width: var(--prose); }

.eyebrow {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--accent);
}

h1, h2, h3 { margin: 0 0 16px; font-weight: 600; }

h1 {
  font-size: 40px;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

h2 { font-size: 28px; line-height: 1.22; letter-spacing: -0.02em; }
h3 { font-size: 20px; line-height: 1.3; }

@media (min-width: 768px) {
  h1 { font-size: 64px; }
  h2 { font-size: 36px; }
}

p { margin: 0 0 16px; }
p.lead, .lead {
  color: var(--muted);
  margin-bottom: 28px;
  font-size: 18px;
  line-height: 1.55;
}
small, .small { font-size: 14px; line-height: 1.45; color: var(--muted); }

/* Header — sits on hero wash */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--hero);
  color: var(--ink);
  border-bottom: 0;
}

.site-header .wrap {
  position: relative;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}

.brand:hover { color: var(--ink); }

.mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-burger {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}

.nav-burger .bars,
.nav-burger .bars::before,
.nav-burger .bars::after {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
  position: relative;
}

.nav-burger .bars::before,
.nav-burger .bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-burger .bars::before { top: -5px; }
.nav-burger .bars::after { top: 5px; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.header-nav {
  display: none;
  align-items: center;
  gap: 28px;
}

.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}

.header-nav a:hover { color: var(--ink); }

.header-nav .btn { margin-left: 4px; color: var(--on-accent); }

.header-nav .btn:hover { color: var(--on-accent); }

/* Language switcher (P4) — SVG flags. Beat `.header-nav a`. */
.header-nav .lang-switch,
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
}

.header-nav .lang-link,
.lang-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 32px;
  padding: 0 8px;
  color: inherit;
  text-decoration: none;
  border-radius: 8px;
  border: 0;
  background: transparent;
}

.header-nav .lang-link:hover,
.lang-link:hover {
  background: var(--bg-card);
}

.header-nav .lang-link.is-current,
.lang-link.is-current {
  background: var(--bg-card);
}

.lang-flag {
  display: block;
  width: 22px;
  height: 15px;
  border-radius: 2px;
  border: 1px solid rgba(18, 52, 74, 0.16);
  overflow: hidden;
}

.lang-sep {
  display: none;
}

@media (min-width: 768px) {
  .nav-burger { display: none; }
  .header-nav { display: flex; }
}

@media (max-width: 767px) {
  .nav-toggle:checked ~ .header-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    background: var(--hero);
    border-bottom: 1px solid var(--line);
    padding: 16px var(--gutter) 24px;
    gap: 12px;
    z-index: 50;
  }
  .header-nav .btn { width: 100%; }
  .header-nav .lang-switch,
  .lang-switch {
    margin-left: 0;
    margin-top: 8px;
    padding-top: 4px;
    width: 100%;
    justify-content: space-between;
  }
  .header-nav .lang-link,
  .lang-link {
    flex: 1;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 150ms linear, border-color 150ms linear, color 150ms linear;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--bg-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  height: auto;
  padding: 0;
  border: 0;
}

.btn-lg {
  height: 52px;
  padding: 0 26px;
  font-size: 16px;
}

.btn[disabled], .btn.is-disabled { opacity: 0.4; pointer-events: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Pills + cards */
.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.45;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.pill-live { color: var(--ok); background: var(--ok-bg); }
.pill-wait { color: var(--wait); background: var(--wait-bg); }

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
}

@media (min-width: 768px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1120px) {
  .card-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.card-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #D4EEFC;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.product-card.is-live .card-icon {
  background: var(--accent);
  color: var(--on-accent);
}

.product-card {
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: var(--elevate);
  transition: border-color 150ms linear, transform 150ms linear;
}

.product-card:hover {
  border-color: var(--accent);
}

@media (min-width: 1120px) {
  .product-card:hover { transform: translateY(-4px); }
}

.product-card.is-live {
  border-color: rgba(26, 122, 224, 0.45);
}

.product-card .pill { align-self: flex-start; }

.product-card h3 { margin: 12px 0 8px; }

.product-card p {
  color: var(--muted);
  margin-bottom: 24px;
  flex: 1;
}

.product-card .btn-row { margin-top: auto; }

.shot {
  margin: 12px 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
}

.shot img { width: 100%; height: 100%; object-fit: cover; }

.caption { font-size: 14px; color: var(--muted); margin: 0 0 8px; }

/* Layout */
.section { padding: 64px 0; }

@media (min-width: 1120px) {
  .section { padding: 96px 0; }
}

.section-alt { background: var(--bg-soft); }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-head h2 { margin-bottom: 0; }

.hero-split {
  position: relative;
  overflow: hidden;
  background: var(--hero);
  padding: 48px 0 120px;
}

@media (min-width: 1120px) {
  .hero-split { padding: 56px 0 140px; }
}

.hero-split::before,
.hero-split::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-split::before {
  width: 560px;
  height: 560px;
  right: -140px;
  top: -180px;
  background: rgba(26, 122, 224, 0.18);
}

.hero-split::after {
  width: 280px;
  height: 280px;
  left: -80px;
  bottom: 24px;
  background: rgba(32, 196, 176, 0.22);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 64px;
  }
}

.hero-copy .lead {
  max-width: 34em;
  font-size: 19px;
}

.hero-copy .btn-row { margin-top: 8px; }

.hero-stage { justify-self: stretch; }

.stage-window {
  background: var(--bg-card);
  border-radius: 20px;
  box-shadow: var(--elevate-lg);
  overflow: hidden;
  max-width: 460px;
  margin-left: auto;
}

.stage-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  background: var(--accent);
}

.stage-chrome .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.stage-chrome .dot:first-child { background: rgba(255, 255, 255, 0.85); }

.stage-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.stage-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-top: 1px solid var(--line);
}

.stage-list li:first-child { border-top: 0; }

.stage-name {
  font-weight: 600;
  font-size: 16px;
}

.products-overlap {
  position: relative;
  z-index: 2;
  margin-top: -88px;
  padding: 0 0 72px;
  background: transparent;
}

@media (min-width: 1120px) {
  .products-overlap {
    margin-top: -104px;
    padding-bottom: 96px;
  }
}

.steps-block {
  background: var(--bg);
}

.steps-block h2 { margin-bottom: 0; }

.steps {
  position: relative;
  display: grid;
  gap: 24px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
  }
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 24px 32px;
  box-shadow: var(--elevate);
}

.step-n {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.step p { margin: 0; color: var(--ink); font-size: 18px; }

.steps-note { text-align: center; margin: 0; }

.contact-band {
  position: relative;
  overflow: hidden;
  background: var(--accent);
  color: var(--on-accent);
}

.contact-band::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  top: -180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.contact-band .wrap { position: relative; z-index: 1; }

.contact-band .lead { color: rgba(255, 255, 255, 0.82); }

.contact-band h2 { color: var(--on-accent); margin-bottom: 8px; }

.contact-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .contact-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
  }
  .contact-inner .copy { max-width: 640px; }
}

.contact-band .btn-primary {
  background: var(--on-accent);
  color: var(--accent);
  border-color: var(--on-accent);
  flex-shrink: 0;
}

.contact-band .btn-primary:hover {
  background: var(--bg-soft);
  border-color: var(--bg-soft);
  color: var(--accent-hover);
}

.contact-band .lead { margin-bottom: 0; }

/* Form */
.form-card {
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--elevate);
  margin-top: 8px;
}

.form { max-width: 480px; }

.form-card .form { max-width: none; }

.form label {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin: 0 0 6px;
}

.form input,
.form textarea {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  font: inherit;
  background: var(--bg-card);
  color: var(--ink);
  margin-bottom: 16px;
}

.form textarea { height: auto; min-height: 120px; padding: 10px 12px; }

.form .hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.form .cf-turnstile { margin: 0 0 16px; }

.form .btn-send {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #38bdf8, #22d3ee);
  color: #04121f;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.25);
}

.form .btn-send:hover {
  background: linear-gradient(135deg, #7dd3fc, #22d3ee);
  color: #04121f;
  border-color: transparent;
}

.form .btn-send:disabled {
  opacity: 0.55;
  cursor: wait;
}

.form-ok { font-size: 14px; color: var(--ok); margin: 0 0 16px; }

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-error { font-size: 14px; color: #8B1E1E; margin: 0 0 12px; }

/* Footer */
.site-footer {
  background: var(--footer);
  color: rgba(255, 255, 255, 0.72);
  padding: 64px 0 40px;
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

@media (min-width: 768px) {
  .footer-grid {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 14px;
}

.footer-links a:hover { color: var(--on-accent); }

.site-footer .small {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.55);
}

.site-footer .mark {
  background: var(--on-accent);
  color: var(--accent);
}

.site-footer .brand,
.site-footer .brand:hover { color: var(--on-accent); }

/* WP content */
.entry h2 { font-size: 20px; }
.wp-site-blocks { background: var(--bg); }

body:not(.home) #main.section {
  background: linear-gradient(180deg, var(--hero) 0%, var(--hero) 72px, var(--bg) 220px);
  padding-top: 48px;
}

@media (min-width: 768px) {
  body:not(.home) #main.section { padding-top: 64px; }
}
.wp-block-group { margin: 0; }
.wp-block-template-part { margin: 0; }
.site-header .wp-block-html,
.site-footer .wp-block-html { margin: 0; }
.site-header .wp-block-html { height: 100%; }

.wp-block-post-title {
  font-size: 36px;
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0 0 20px;
}

@media (min-width: 768px) {
  .wp-block-post-title { font-size: 48px; }
}

a.btn[target="_blank"]::after {
  content: "\2197";
  font-size: 12px;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .btn, .product-card, .form .btn-send { transition: none; box-shadow: none; }
  .product-card:hover { transform: none; }
}
