/* IMTerm Site — style.css */

/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
  --navy:       #1E2761;
  --dark-navy:  #141B3D;
  --accent:     #4FC3F7;
  --accent-dark:#0288D1;
  --green:      #2E7D32;
  --green-light:#4CAF50;
  --white:      #FFFFFF;
  --light-bg:   #F8FAFC;
  --gray:       #64748B;
  --dark-text:  #1E293B;
  --border:     #E2E8F0;
  --ice:        #CADCFC;
  --terminal-bg:#0A0A0A;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--dark-text);
  line-height: 1.6;
  background: var(--white);
}

a {
  color: #0277BD;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Restore accent color for links on dark backgrounds */
.section-dark a:not(.btn),
.hero a:not(.btn) {
  color: var(--accent);
}

/* ── Typography ─────────────────────────────────────────────────────────── */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--navy);
}
h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
}
h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
}
p {
  font-size: 1rem;
  line-height: 1.7;
}

/* ── Navigation ─────────────────────────────────────────────────────────── */
.nav {
  background: var(--dark-navy);
  height: 60px;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
}
.nav-brand:hover {
  text-decoration: none;
}
.nav-brand img {
  height: 36px;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}
.nav-links a {
  color: var(--ice);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  text-decoration: none;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  background-color: var(--dark-navy);
  background-image: linear-gradient(135deg, var(--dark-navy), var(--navy));
  color: var(--white);
  padding: 5rem 2rem;
  text-align: center;
}
.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
}
.hero .subtitle {
  font-size: 1.25rem;
  color: var(--ice);
  opacity: 0.9;
  margin-bottom: 0.75rem;
}
.hero .tagline {
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 0;
}
.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-primary:hover {
  background: var(--dark-navy);
  border-color: var(--dark-navy);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-secondary:hover {
  background: var(--white);
  color: var(--navy);
}

.btn-green {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn-green:hover {
  background: var(--green-light);
  border-color: var(--green-light);
}

.btn-accent {
  background: var(--accent);
  color: var(--dark-navy);
  font-weight: 700;
  border-color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--white);
}

/* ── Sections ───────────────────────────────────────────────────────────── */
.section {
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-dark {
  background: var(--dark-navy);
  color: var(--white);
  max-width: none;
  padding: 4rem 2rem;
}
.section-dark h2,
.section-dark h3 {
  color: var(--white);
}
.section-dark p {
  color: var(--ice);
}

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

.section h2 {
  text-align: center;
  margin-bottom: 2.5rem;
}

/* ── Feature Grid & Cards ───────────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.feature-card {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-top: 3px solid var(--navy);
  transition: box-shadow 0.2s, transform 0.2s;
}
.feature-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}
.feature-card .icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.feature-card h3 {
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.feature-card p {
  color: var(--gray);
  font-size: 0.95rem;
}
.section-dark .feature-card {
  color: var(--dark-text);
}
.section-dark .feature-card h3 {
  color: var(--navy);
}
.section-dark .feature-card p {
  color: var(--gray);
}
.section-dark .feature-card .card-list li {
  color: var(--gray);
}

/* ── Stat Bar ───────────────────────────────────────────────────────────── */
.stat-bar {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 2rem 0;
}
.stat-item {
  text-align: center;
}
.stat-item .stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}
.stat-item .stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--gray);
  margin-top: 0.25rem;
}

/* ── Screenshots ────────────────────────────────────────────────────────── */
.screenshot {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: block;
  margin: 0 auto;
}
.screenshot-caption {
  text-align: center;
  color: var(--gray);
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-style: italic;
}
.screenshot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.screenshot-grid img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* ── Protocol Cards ─────────────────────────────────────────────────────── */
.protocol-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}
.protocol-card {
  background: #1A2035;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  border-top: 3px solid var(--accent);
}
.proto-5250 {
  border-top-color: #4FC3F7;
}
.proto-3270 {
  border-top-color: #F59E0B;
}
.proto-vt {
  border-top-color: #10B981;
}
.proto-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.protocol-card h3 {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.protocol-card p {
  color: var(--ice);
  font-size: 0.9rem;
}

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  background: var(--accent);
  color: var(--dark-navy);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}
.badge-pro {
  background: var(--accent);
  color: var(--dark-navy);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  margin-left: 0.5rem;
  vertical-align: middle;
  display: inline-block;
}

/* ── Tab Nav & Content ──────────────────────────────────────────────────── */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.tab-nav a,
.tab-nav button {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}
.tab-nav a:hover,
.tab-nav button:hover {
  color: var(--navy);
  text-decoration: none;
}
.tab-nav a.active,
.tab-nav button.active {
  color: var(--navy);
  border-bottom-color: var(--accent);
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* ── Code Block ─────────────────────────────────────────────────────────── */
.code-block {
  background: #0F172A;
  color: #E2E8F0;
  font-family: 'Courier New', 'Consolas', 'Fira Code', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid #1E293B;
}

/* ── Terminal Preview ───────────────────────────────────────────────────── */
.terminal-preview {
  background: var(--terminal-bg);
  border-radius: 10px;
  padding: 1.5rem;
  font-family: 'Courier New', monospace;
  color: #33FF33;
  font-size: 0.85rem;
  line-height: 1.4;
  overflow-x: auto;
  max-width: 700px;
  margin: 1.5rem auto;
  border: 1px solid #333;
  text-align: left;
}

/* ── Comparison Table ───────────────────────────────────────────────────── */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.comparison-table th {
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
}
.comparison-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
}
.comparison-table tr:nth-child(even) td {
  background: var(--light-bg);
}
.comparison-table tr:hover td {
  background: #EFF6FF;
}

/* Override for comparison tables placed inside dark sections */
.section-dark .comparison-table td {
  color: var(--white);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
.section-dark .comparison-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.07);
}
.section-dark .comparison-table tr:hover td {
  background: rgba(255, 255, 255, 0.13);
}
.section-dark .comparison-table code {
  color: #93C5FD;
}
.section-dark .yes {
  color: #66BB6A;
}
.yes   { color: var(--green);      font-weight: 700; }
.no    { color: #C62828;           }
.partial { color: #B45309;         }

/* ── Pricing Grid ───────────────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.pricing-card {
  background: var(--white);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
  border: 2px solid transparent;
}
.pricing-card.featured {
  border-color: var(--accent);
}
.pricing-card .plan-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
}
.pricing-card .price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dark-text);
  margin: 0.5rem 0;
}
.pricing-card .price-note {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.pricing-card ul {
  list-style: none;
  text-align: left;
  margin-bottom: 1.5rem;
}
.pricing-card li {
  padding: 0.3rem 0;
  color: var(--dark-text);
  font-size: 0.95rem;
}
.pricing-card li::before {
  content: "\2713 ";
  color: var(--green);
  font-weight: 700;
}

/* ── Download Grid ──────────────────────────────────────────────────────── */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.download-card {
  background: var(--white);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-align: center;
  border-top: 3px solid var(--navy);
}
.download-card .os-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
.download-card h3,
.download-card h2 {
  margin-bottom: 0.5rem;
}
.download-card p {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ── Stats Bar ──────────────────────────────────────────────────────────── */
.stats-bar {
  background: var(--light-bg);
  padding: 4rem 2rem;
  text-align: center;
}
.stats-grid {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ── What's New ─────────────────────────────────────────────────────────── */
.whats-new-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 3rem;
  max-width: 720px;
  margin: 1.5rem auto 0;
}
.whats-new-list {
  list-style: none;
}
.whats-new-list li {
  padding: 0.35rem 0 0.35rem 1.4rem;
  position: relative;
  color: var(--ice);
  font-size: 0.95rem;
}
.whats-new-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.changelog-link {
  text-align: center;
  margin-top: 1.5rem;
}
.changelog-link a {
  color: var(--accent);
  font-weight: 600;
}

/* ── Card Link ──────────────────────────────────────────────────────────── */
.card-link {
  display: inline-block;
  margin-top: 0.75rem;
  color: #0277BD;
  font-size: 0.88rem;
  font-weight: 600;
}
.card-link:hover {
  color: var(--navy);
}

/* ── Tech Grid ──────────────────────────────────────────────────────────── */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.tech-item {
  background: var(--white);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}
.tech-name {
  font-weight: 700;
  color: var(--navy);
  display: block;
}
.tech-desc {
  font-size: 0.85rem;
  color: var(--gray);
  display: block;
  margin-top: 0.2rem;
}

/* ── CTA Text ───────────────────────────────────────────────────────────── */
.cta-text {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-navy);
  margin-bottom: 1rem;
}

/* ── Footer Links (simple inline footer for inner pages) ────────────────── */
.footer-links {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.footer-links a {
  color: var(--ice);
}
.footer-links a:hover {
  color: var(--accent);
}

/* ── Hero Note ──────────────────────────────────────────────────────────── */
.hero-note {
  margin-top: 0.75rem;
  color: var(--ice);
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ── CTA Banner ─────────────────────────────────────────────────────────── */
.cta-banner {
  background: var(--accent);
  color: var(--dark-navy);
  text-align: center;
  padding: 3rem 2rem;
}
.cta-banner h2 {
  color: var(--dark-navy);
  margin-bottom: 1rem;
}
.cta-banner p {
  color: var(--dark-navy);
  opacity: 0.85;
  margin-bottom: 1.5rem;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  background: var(--dark-navy);
  color: var(--white);
  padding: 3rem 2rem;
}
.footer a {
  color: var(--ice);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.footer-grid h4 {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.footer-grid ul {
  list-style: none;
}
.footer-grid ul li {
  margin-bottom: 0.5rem;
}
.footer-grid ul li a {
  color: var(--ice);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-grid ul li a:hover {
  color: var(--accent);
  text-decoration: none;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
  color: #94A3B8;
  font-size: 0.85rem;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
.footer-bottom a {
  color: var(--ice);
}
.footer p a {
  color: var(--ice);
  text-decoration: underline;
}

/* ── Animations ─────────────────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Dark Mode ──────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  body {
    background: #0F172A;
    color: #E2E8F0;
  }
  h1, h2, h3 {
    color: #E2E8F0;
  }
  .feature-card {
    background: #1E293B;
    border-color: #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }
  a {
    color: var(--accent);
  }
  .feature-card p {
    color: #E2E8F0;
  }
  .section-light {
    background: #1E293B;
  }
  .pricing-card,
  .download-card {
    background: #1E293B;
  }
  .comparison-table tr:nth-child(even) td {
    background: #1E293B;
  }
  .comparison-table tr:hover td {
    background: #263352;
  }
  .comparison-table td {
    border-bottom-color: #334155;
  }
  .yes {
    color: #66BB6A;
  }
  .tab-nav {
    border-bottom-color: #334155;
  }
  .tab-nav a,
  .tab-nav button {
    color: #94A3B8;
  }
  .tech-item {
    background: #1E293B;
  }
  .tech-name {
    color: #E2E8F0;
  }
  .tech-desc {
    color: #94A3B8;
  }
  .stats-bar {
    background: #1E293B;
  }
  .stat-item .stat-label {
    color: #94A3B8;
  }
  .screenshot-caption {
    color: #94A3B8;
  }
  .pricing-card .price-note {
    color: #94A3B8;
  }
  .download-card p {
    color: #94A3B8;
  }
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .protocol-grid {
    grid-template-columns: 1fr;
  }
  .screenshot-grid {
    grid-template-columns: 1fr;
  }
  .stat-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .download-grid {
    grid-template-columns: 1fr;
  }
  .whats-new-grid {
    grid-template-columns: 1fr;
  }
  .tech-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Print ──────────────────────────────────────────────────────────────── */
@media print {
  nav, .nav, header nav, .hero-buttons, .cta, footer, .footer-links,
  .btn, button, .cookie-banner { display: none !important; }

  body { background: #fff; color: #000; font-size: 11pt; }
  a { color: #000; text-decoration: underline; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  h1, h2, h3 { page-break-after: avoid; }
  pre, blockquote, table { page-break-inside: avoid; }
  .hero { padding: 1rem 0; }
  .hero-title { font-size: 22pt; }
  .feature-grid, .download-grid, .pricing-grid { display: block; }
  .feature-card, .pricing-card { border: 1px solid #ccc; margin-bottom: 1rem; padding: 0.5rem; }
}
