/* TFO site styles: Fluent-inspired tokens, light and dark themes. No external fonts or scripts. */

:root {
  --brand: #0f6cbd;
  --brand-hover: #115ea3;
  --brand-pressed: #0c3b5e;
  --brand-soft: #ebf3fc;
  --on-brand: #ffffff;
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --surface: #ffffff;
  --text: #242424;
  --text-muted: #616161;
  --border: #e0e0e0;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
  --radius: 8px;
  --radius-lg: 12px;
  --max: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #479ef5;
    --brand-hover: #62abf5;
    --brand-pressed: #2886de;
    --brand-soft: #082338;
    --on-brand: #0a0a0a;
    --bg: #141414;
    --bg-alt: #1b1b1b;
    --surface: #222222;
    --text: #f2f2f2;
    --text-muted: #b3b3b3;
    --border: #333333;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --brand: #479ef5;
  --brand-hover: #62abf5;
  --brand-pressed: #2886de;
  --brand-soft: #082338;
  --on-brand: #0a0a0a;
  --bg: #141414;
  --bg-alt: #1b1b1b;
  --surface: #222222;
  --text: #f2f2f2;
  --text-muted: #b3b3b3;
  --border: #333333;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand);
}

a:hover {
  color: var(--brand-hover);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 8px 12px;
  background: var(--surface);
  border-radius: var(--radius);
  z-index: 100;
}

.skip-link:focus {
  left: 8px;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.brand small {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 13px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 640px) {
  .nav .nav-link {
    display: none;
  }
  .brand small {
    display: none;
  }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--brand);
  color: var(--on-brand);
}

.btn-primary:hover {
  background: var(--brand-hover);
  color: var(--on-brand);
}

.btn-primary:active {
  background: var(--brand-pressed);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* ---- Hero ---- */
.hero {
  padding: 88px 0 72px;
  background:
    radial-gradient(1200px 400px at 50% -120px, var(--brand-soft), transparent 70%),
    var(--bg);
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
}

.hero h1 {
  margin: 0 auto 20px;
  max-width: 880px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero .lead {
  margin: 0 auto 32px;
  max-width: 680px;
  font-size: clamp(17px, 2vw, 20px);
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.hero-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---- Sections ---- */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 680px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.5vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 17px;
}

/* ---- Feature grid ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.card-highlight {
  border-color: var(--brand);
}

/* ---- Pricing ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  align-items: stretch;
}

/* Two plans: keep the cards a readable width instead of stretching across the page. */
.pricing-grid-2 {
  max-width: 760px;
  margin: 0 auto;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 28px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 12px;
  font-weight: 700;
}

.plan h3 {
  font-size: 20px;
}

.plan-desc {
  min-height: 48px;
}

.price {
  margin: 20px 0 4px;
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
}

.price-note {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.plan ul {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  flex: 1;
}

.plan li {
  position: relative;
  padding: 6px 0 6px 28px;
  font-size: 15px;
}

.plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230f6cbd' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

.plan li.muted {
  color: var(--text-muted);
}

.plan li.muted::before {
  background: var(--bg-alt)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 8h6' fill='none' stroke='%23999' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

.plan .btn {
  width: 100%;
}

/* ---- Privacy callout ---- */
.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
}

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

/* ---- Documents (privacy / support) ---- */
.doc {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.doc h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.doc .meta {
  margin: 0 0 32px;
  color: var(--text-muted);
  font-size: 14px;
}

.doc h2 {
  margin: 40px 0 12px;
  padding-top: 8px;
  font-size: 22px;
  line-height: 1.3;
}

.doc h3 {
  margin: 24px 0 8px;
  font-size: 17px;
}

.doc p,
.doc li {
  color: var(--text);
}

.doc ul,
.doc ol {
  padding-left: 22px;
}

.doc li + li {
  margin-top: 6px;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 15px;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.doc th {
  background: var(--bg-alt);
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
}

.highlight-box {
  margin: 24px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  background: var(--brand-soft);
}

.highlight-box p:last-child {
  margin-bottom: 0;
}

.toc {
  margin: 0 0 32px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.toc strong {
  display: block;
  margin-bottom: 6px;
}

.toc ol {
  margin: 0;
}

code {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-family: Consolas, "Cascadia Mono", ui-monospace, monospace;
  font-size: 0.9em;
  word-break: break-all;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0 !important;
}

.steps > li {
  position: relative;
  padding-left: 44px;
  margin-top: 16px !important;
}

.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin: 10px 0;
}

summary {
  padding: 14px 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  float: right;
  color: var(--text-muted);
  font-weight: 400;
}

details[open] summary::after {
  content: "\2212";
}

details > div {
  padding: 0 18px 14px;
}

.contact-card {
  margin-top: 16px;
}

/* ---- Activation page ---- */
.activate .state {
  margin-top: 8px;
}

.state-title {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 600;
}

.state h2 {
  margin-top: 24px;
  font-size: 18px;
}

.details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 20px;
  margin: 16px 0;
  font-size: 15px;
}

.details dt {
  color: var(--text-muted);
}

.details dd {
  margin: 0;
  word-break: break-word;
}

@media (max-width: 520px) {
  .details {
    grid-template-columns: 1fr;
  }
  .details dd {
    margin-bottom: 8px;
  }
}

.trial-note {
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--brand-soft);
  font-size: 14px;
}

.state-error {
  color: #c50f1f;
  font-weight: 600;
}

:root[data-theme="dark"] .state-error {
  color: #ff99a4;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .state-error {
    color: #ff99a4;
  }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 0;
}

.link-button {
  padding: 0;
  border: none;
  background: none;
  color: var(--brand);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: -2px;
  border: 2px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: tfo-spin 0.8s linear infinite;
}

@keyframes tfo-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
}

[hidden] {
  display: none !important;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}
