/* TermLink pages: app page, TermLink for Mac, support & privacy.
   Builds on /style.css. */

.termlink-hero {
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
}

.termlink-hero h1 {
  font-size: clamp(3rem, 7.4vw, 5.6rem);
}

.termlink-tagline {
  margin-top: 22px;
  color: var(--text);
  font-size: clamp(1.12rem, 2vw, 1.4rem);
  font-weight: 700;
  line-height: 1.6;
}

.termlink-preview {
  position: relative;
  width: min(340px, 100%);
  justify-self: center;
  margin: 0;
}

.termlink-preview::before {
  content: "";
  position: absolute;
  inset: 8% -12% 4%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(18, 199, 182, 0.35), rgba(99, 102, 241, 0.18) 55%, transparent);
  filter: blur(10px);
}

.termlink-preview img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border-strong);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
}

.termlink-preview figcaption {
  margin-top: 14px;
  color: var(--faint);
  font-size: 0.84rem;
  text-align: center;
}

.termlink-example {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  margin: 24px 0 8px;
  padding: clamp(24px, 3.5vw, 36px);
}

.termlink-example h3 {
  font-size: 1.2rem;
}

.termlink-example pre {
  margin: 0;
  padding: 20px 22px;
  border-radius: 14px;
  background: var(--term-bg);
  color: var(--term-text);
  font-size: 0.88rem;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.termlink-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.termlink-plan {
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 3.5vw, 40px);
}

.termlink-plan--pro {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(18, 199, 182, 0.14), transparent 55%),
    radial-gradient(120% 120% at 0% 100%, rgba(139, 92, 246, 0.12), transparent 55%),
    var(--surface);
}

.termlink-plan h3 {
  font-size: 1.15rem;
}

.termlink-plan .termlink-price {
  margin: 14px 0 18px;
  color: var(--text);
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.termlink-price small {
  color: var(--faint);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
}

.termlink-plan ul {
  margin: 12px 0 24px;
  padding: 0;
  list-style: none;
}

.termlink-plan li {
  position: relative;
  padding: 7px 0 7px 26px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.termlink-plan li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: calc(7px + 0.5em);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.termlink-plan .button {
  align-self: flex-start;
  margin-top: auto;
}

.termlink-plan .note {
  margin-top: auto;
}

/* ---------- TermLink for Mac ---------- */

.mac-hero h1 {
  font-size: clamp(2.3rem, 5.6vw, 4.3rem);
}

.mac-visual {
  position: relative;
  width: 100%;
  max-width: 520px;
  justify-self: center;
  padding: 0 0 48px;
}

.mac-screen {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(18, 199, 182, 0.55), transparent 55%),
    radial-gradient(120% 90% at 100% 20%, rgba(139, 92, 246, 0.55), transparent 55%),
    radial-gradient(120% 120% at 50% 120%, rgba(236, 72, 153, 0.45), transparent 60%),
    #1a1f3a;
  box-shadow: var(--shadow-lg);
  min-height: 430px;
}

.mac-menubar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 30px;
  padding: 0 14px;
  background: rgba(20, 22, 34, 0.55);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  color: #f3f5ff;
  font-size: 0.74rem;
  white-space: nowrap;
}

.mac-menubar b {
  font-weight: 700;
}

.mac-menubar .mb-right {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.mb-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 22px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.24);
}

.mb-icon svg {
  width: 16px;
  height: 16px;
}

.mac-menu {
  position: absolute;
  top: 34px;
  right: 46px;
  width: min(300px, calc(100% - 28px));
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  background: rgba(246, 247, 252, 0.82);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.45), 0 0 0 0.5px rgba(0, 0, 0, 0.2);
  color: #15171f;
  font-size: 0.8rem;
  line-height: 1.4;
}

.mm-item,
.mm-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 5px;
}

.mm-label {
  color: #6b7080;
  font-size: 0.72rem;
  font-weight: 600;
}

.mm-item small {
  display: block;
  color: #5d6272;
  font-size: 0.7rem;
}

.mm-item.is-hover {
  background: #2f6df6;
  color: #fff;
}

.mm-check::before {
  content: "✓";
  width: 10px;
  margin-left: -2px;
  font-size: 0.7rem;
}

.mm-indent {
  padding-left: 20px;
}

.mm-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #22c55e;
}

.mm-sep {
  height: 1px;
  margin: 5px 10px;
  background: rgba(0, 0, 0, 0.1);
}

.mac-qr {
  left: -18px;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(270px, 70%);
}

.mac-qr svg {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  padding: 5px;
  border-radius: 10px;
  background: #fff;
  color: #0b0e1a;
}

.mac-qr strong {
  display: block;
  font-size: 0.86rem;
}

.mac-qr span {
  color: var(--faint);
  font-size: 0.76rem;
}

@media (prefers-color-scheme: dark) {
  .mac-menu {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(40, 42, 54, 0.78);
    color: #f1f3fb;
  }

  .mm-label,
  .mm-item small {
    color: #a3a8ba;
  }

  .mm-item.is-hover small {
    color: rgba(255, 255, 255, 0.85);
  }

  .mm-sep {
    background: rgba(255, 255, 255, 0.12);
  }
}

.mm-item.is-hover small {
  color: rgba(255, 255, 255, 0.85);
}

.download-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: var(--faint);
  font-size: 0.86rem;
}

.download-meta li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.download-meta li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* Connection diagram */

.route {
  display: grid;
  gap: 14px;
  padding: clamp(22px, 3.5vw, 34px);
}

.route-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.route-node {
  display: grid;
  place-items: center;
  gap: 4px;
  width: 84px;
  padding: 12px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--bg-elev);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.route-node svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.route-line {
  position: relative;
  min-width: 0;
  padding-bottom: 18px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
  text-align: center;
}

.route-line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--border-strong) 50%, transparent 50%) 0 0 / 12px 2px repeat-x;
}

.route-line::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: packet 2.8s var(--ease) infinite;
}

.route-row:nth-child(2) .route-line::after {
  background: #8b5cf6;
  box-shadow: 0 0 12px #8b5cf6;
  animation-delay: -1.4s;
}

.route-line b {
  display: block;
  color: var(--text);
  font-weight: 600;
}

@keyframes packet {
  0% { left: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: calc(100% - 8px); opacity: 0; }
}

@media (max-width: 1040px) {
  .termlink-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .termlink-preview {
    width: min(300px, 100%);
  }
}

@media (max-width: 760px) {
  .termlink-example,
  .termlink-plans {
    grid-template-columns: minmax(0, 1fr);
  }

  .mac-menu {
    right: 14px;
  }

  .mac-qr {
    left: 8px;
  }
}

@media (max-width: 420px) {
  .mac-menubar .mb-hide {
    display: none;
  }

  .route-node {
    width: 68px;
    font-size: 0.7rem;
  }
}
