:root {
    /* Dark slate base with teal + sky + green accents */
    --page-bg: #0f1724;  /*very dark slate   */
    /*--page-bg: #0fFF24;*/  /*Green for testing */
    --page-bg2: #080c12f2; /* very dark blue*/
    --surface: #0b1220; /* card / panel surface */
    --qgo-primary: #0d9488; /* teal (primary buttons) */
    --qgo-primary-600: #0f766e; /* darker teal for borders */
    --qgo-accent: #38bdf8; /* sky blue accent (focus glow, highlights) */
    --qgo-link: #0d9488; /* lighter sky for links */
    --qgo-success: #10b981; /* vivid green for success */
    --muted: #afb9bd; /* muted text on dark background */
    --shadow-sm: 0 6px 18px rgba(2,6,23,0.6);
    --shadow-md: 0 12px 30px rgba(2,6,23,0.65);
    --radius: 10px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Layout + base */
/* Use min-height so the page can grow past the viewport and the gradient continues.
   Keep the gradient fixed so it looks frosted when the navbar applies backdrop blur. */
html, body {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(180deg, var(--page-bg2), var(--page-bg));
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    color: #e6eef8;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
}

/* Prevent default white focus ring on headings while preserving keyboard focus visibility */
/* Remove focus ring when not keyboard focused, keep visible for keyboard users using :focus-visible */
/* Hide default outline for headings when focused by mouse/auto-focus */
h1:focus:not(:focus-visible),
h2:focus:not(:focus-visible),
.page h1:focus:not(:focus-visible),
.page h2:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}

/* Provide subtle focus-visible indicator for accessibility (keyboard users) */
H1:focus-visible, h2:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.25rem var(--qgo-accent);
    border-radius: 6px;
}

/* Also ensure the hero header doesn't show an unwanted border */
.app-header h1:focus, .app-header h2:focus {
    outline: none;
    box-shadow: none;
}

/* Preserve Blazor error UI (do not remove) */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Typography */
h1, h2, h3, h4 { margin: 0 0 .5rem 0; color: #f8fafc; }
p { margin: 0 0 .75rem 0; color: #cbd5e1; }
.text-muted { color: var(--muted); }

/* Links */
a, .btn-link {
    color: var(--qgo-link);
}
a:hover, .btn-link:hover { text-decoration: underline; }

/* Buttons */
.btn {
    border-radius: calc(var(--radius) - 2px);
    padding: .45rem .75rem;
    font-weight:600;
    border: 1px solid transparent;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    gap:.5rem;
    box-shadow: none;
    text-decoration: none;
    color: inherit;
    background: transparent;
    transition: all 0.2s ease;
}
.btn:focus { outline: none; box-shadow: 0 0 0 0.1rem rgba(255,255,255,0.02), 0 0 0 0.25rem var(--qgo-accent); }
.btn-primary {
    color: #042027;
    background: linear-gradient(180deg, var(--qgo-primary), var(--qgo-primary-600));
    border-color: rgba(0,0,0,0.12);
    box-shadow: var(--shadow-sm);
}
.btn-secondary {
    background: rgba(255,255,255,0.03);
    color: var(--qgo-link);
    border: 1px solid rgba(125,211,252,0.08);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(125,211,252,0.12);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13,148,136,0.1);
}

/* Hero CTA: make download more enticing */
.hero .qgo-cta.qgo-primary {
  padding: .72rem 1.25rem;
  font-size: 1.05rem;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  box-shadow: 0 12px 30px rgba(13,148,136,0.14);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  background: linear-gradient(90deg, var(--qgo-primary), var(--qgo-primary-600));
  color: #042027;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.2px;
  transform: translateY(0);
  /* entrance pop */
  animation: heroCtaPop 520ms cubic-bezier(.2,.9,.2,1) 320ms both;
}

.hero .qgo-cta.qgo-primary:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 28px 60px rgba(13,148,136,0.18);
  filter: brightness(1.02);
}

.hero .qgo-cta.qgo-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.28rem rgba(56,189,248,0.12), 0 28px 60px rgba(13,148,136,0.16);
}

@keyframes heroCtaPop {
  from { transform: translateY(8px) scale(.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Form focus and validation */
.form-control:focus, .btn:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem rgba(255,255,255,0.02), 0 0 0 0.25rem var(--qgo-accent);
}
.valid.modified:not([type=checkbox]) { outline: 1px solid var(--qgo-success); }
.invalid { outline: 1px solid #ff6b6b; }
.validation-message { color: #ff8d8d; }

/* Content primitives */
.container { max-width: 980px; margin: 1.25rem auto; padding: 0 1rem; }
.content { padding-top: 1rem; }
.card {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,255,255,0.03);
}

/* Header */
.app-header {
    background: unset;
    /*background: linear-gradient(180deg, rgba(3,17,23,0.6), rgba(8,14,20,0.35));*/
    border-bottom: 1px solid rgba(125,211,252,0.04);
    padding: 0.75rem 1rem;
    display:flex;
    align-items:center;
    gap: .75rem;
}
.app-header .title {
    font-weight:700;
    color: var(--qgo-primary);
    font-size:1.05rem;
}

/* Download panel + license */
.download-panel {
    display:flex;
    gap:1rem;
    align-items:center;
    padding:.6rem;
    border-radius:8px;
    background: linear-gradient(180deg, rgba(16,30,37,0.6), rgba(9,16,20,0.5));
    border:1px solid rgba(125,211,252,0.04);
    width:25%;
}
.download-panel .info { flex:1; }
.download-panel .version { color:var(--muted); font-size:.9rem; }
.download-panel .download-btn { min-width:12rem; }

/* Section subtitle styling - renamed from license-badge */
.section-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(13,148,136,0.12), rgba(56,189,248,0.06));
    color: var(--qgo-primary);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.3px;
    border: 1px solid rgba(13,148,136,0.06);
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(13,148,136,0.08);
}

/* Device list */
.devices { margin-top:.5rem; display:grid; gap:.5rem; }
.device {
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:.6rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.00));
    border-radius:8px;
    border:1px solid rgba(255,255,255,0.02);
    font-size:.95rem;
}
.device .meta { color:var(--muted); font-size:.85rem; }
.device .actions { display:flex; gap:.5rem; }

/* Loading visuals */
.loading-progress { margin-top:18vh; }
.loading-progress circle:last-child { stroke: var(--qgo-accent); }
/* Loading progress replaced with brand logo */
.loading-progress-logo {
    display: block;
    width: 96px;
    height: 96px;
    margin: 18vh auto 0 auto;
    opacity: 0;
    transform: translateY(8px);
    animation: loadingLogoIn 560ms cubic-bezier(.2,.9,.2,1) 120ms forwards;
}

@keyframes loadingLogoIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Utilities */
.row { display:flex; gap:1rem; align-items:center; }
.col { flex:1; }
.small { font-size:.85rem; }

/* Align flex row items to top and ensure cards stretch nicely inside columns */
.row.align-top {
    align-items: flex-start; /* top-align items instead of centering */
}

/* Make columns and cards behave as vertical stacks so cards can size consistently */
.row.align-top .col {
    display: flex;
    flex-direction: column;
}

.row.align-top .col .card {
    flex: 1 1 auto; /* allow card to grow to the tallest sibling if needed */
    display: flex;
    flex-direction: column;
}

/* Responsive tweaks */
@media (max-width:640px) {
    .row { flex-direction:column; align-items:stretch; }
    .download-panel { flex-direction:column; align-items:flex-start; }
}

/* Full-bleed GIF section */
.full-bleed-gif {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  background: #495359;
  padding: 2.25rem 0;
  box-sizing: border-box;
  z-index: 0;
  overflow: visible;
}
.full-bleed-inner { width:100%; margin: 0; padding: 0; display:flex; justify-content:center; }
/* make the GIF smaller and centered: full width up to a max, keep aspect ratio */
.demo-gif { width:100%; max-width: 580px; height: auto; border-radius: 8px; }

/* Add subtle depth: top and bottom soft shadows using pseudo-elements */
.full-bleed-gif::before,
.full-bleed-gif::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 5;
}
 /* top shadow: fade out from dark to transparent downward */
.full-bleed-gif::before {
  top: 0;
  height: 40px;
  background: linear-gradient(to bottom, rgba(2,6,23,0.25), rgba(2,6,23,0.00));
}
/* bottom shadow: fade out from dark to transparent upward */
.full-bleed-gif::after {
  bottom: 0;
  height: 40px;
  background: linear-gradient(to top, rgba(2,6,23,0.25), rgba(2,6,23,0.00));
}

/* responsive adjustments: smaller screens use most of the width */
@media (max-width: 1200px) {
  .demo-gif { max-width: 760px; }
}
@media (max-width: 860px) {
  .demo-gif { max-width: 100%; border-radius: 6px; }
  .full-bleed-gif::before, .full-bleed-gif::after { height: 36px; }
}

code {
    color: #c02d76;
}

/* Hero typography and reveal animation */
.hero-title {
    font-family: "Poppins", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 6vw, 3.2rem);
    letter-spacing: 0.2px;
    line-height: 1.02;
    margin: 0 0 .5rem 0;
    /* gradient clipped text */
    background: linear-gradient(90deg, #7ee7d6 0%, #22d3ee 45%, #60a5fa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 6px 18px rgba(2,6,23,0.45);
    transform: translateY(8px);
    opacity: 0;
    animation: heroReveal 700ms ease-out 120ms forwards;
}

/* Hero subtitle - increased prominence */
.hero-subtitle {
    color: #0D8F83; /* prominent teal requested */
    font-size: clamp(1.1rem, 2.4vw, 1.25rem); /* slightly larger on most screens */
    font-weight: 700; /* bolder for emphasis */
    letter-spacing: 0.2px;
    margin-bottom: 1.0rem;
    transform: translateY(8px);
    opacity: 0;
    animation: heroReveal 700ms ease-out 260ms forwards;
    text-shadow: 0 6px 18px rgba(2,6,23,0.32);
}

@keyframes heroReveal {
  to { transform: translateY(0); opacity: 1; }
}

/* Slightly stronger CTA micro-interaction */
.qgo-cta.qgo-primary { transition: transform .14s cubic-bezier(.2,.9,.2,1), box-shadow .14s ease; }
.qgo-cta.qgo-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 18px 40px rgba(13,148,136,0.12); }

/* Animated underline for title */
.hero-title::after {
    content: "";
    display:block;
    width:40%;
    height:3px;
    background: linear-gradient(90deg,#7ee7d6,#22d3ee);
    border-radius:3px;
    margin-top:.5rem;
    transform-origin: left;
    transform: scaleX(0);
    opacity: .95;
    transition: transform .5s cubic-bezier(.2,.9,.2,1);
}
.hero-title.show-after::after { transform: scaleX(1); }

/* Hero layout: layered visual + content */
.hero {
    position: relative;
    display: grid;
    grid-template-columns: 340px 1fr; /* left visual column + flexible content column */
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem 1rem;
    max-width: 1200px; /* keep hero centered on very wide screens */
    margin-inline: auto; /* center the hero block horizontally */
}

.hero-content {
    justify-self: start; /* align content column toward center of page */
    align-self: center;
    text-align: left; /* left-align text for a stronger visual anchor */
    padding-left: 2rem; /* add breathing room between visual and text */
    padding-right: 1rem;
    max-width: 700px; /* keep content readable */
    margin-left: 0; /* remove invalid rem value */
    margin-right: 0;
}

/* Ensure small screen stays stacked and centered */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; margin-left: 1rem; margin-right: 1rem; max-width: none; }
  .hero-visual { order: -1; justify-content: center; padding-left: 0; }
  .hero-content { padding: 0; justify-self: center; text-align: center; }
  .hero-logo { width:220px; height:220px; }
}

/* Shift the logo to the far left of its column on large screens */
.hero-visual { position: relative; display:flex; align-items:center; justify-content:flex-start; padding-left: .5rem; }
.hero-logo { width: 300px; height: 300px; max-width:100%; object-fit: contain; filter: drop-shadow(0 24px 40px rgba(0,0,0,0.6)); transform: translateY(6px); }

@media (prefers-reduced-motion: reduce) {
  .hero-title, .hero-subtitle { animation: none; transform: none; opacity: 1; }
  .qgo-cta.qgo-primary:hover { transform: none; box-shadow: var(--shadow-sm); }
}

/* Feature Matrix Table Styling */
.feature-matrix .table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius);
    overflow: hidden;
    margin: 0;
}

.feature-matrix .table th {
    background: linear-gradient(90deg, rgba(13,148,136,0.08), rgba(56,189,248,0.04));
    color: var(--qgo-primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.875rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.feature-matrix .table td {
    padding: 0.875rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.9rem;
    vertical-align: middle;
    color: #e2e8f0; /* Light gray text for better contrast */
}

.feature-matrix .table td strong {
    color: #f8fafc; /* Even lighter for emphasized text */
    font-weight: 600;
}

/* Feature cell stacking - emoji above text */
.feature-matrix .table td > div {
    min-height: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.feature-matrix .table td > div > span:first-child {
    font-size: 1.25rem;
    line-height: 1;
    display: block;
}

.feature-matrix .table td > div > span:last-child {
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    color: #cbd5e1;
}

.feature-matrix .table tr:nth-child(even) {
    background: rgba(255,255,255,0.015);
}

.feature-matrix .table tr:hover {
    background: rgba(13,148,136,0.02);
}

.feature-matrix .table tr:hover td {
    color: #f1f5f9; /* Slightly lighter on hover for better readability */
}

.feature-matrix .table tr:hover td > div > span:last-child {
    color: #e2e8f0; /* Lighter sub-text on hover */
}

/* Highlight premium features */
.feature-matrix .table tr[style*="background-color: #f8fafc"] {
    background: rgba(13,148,136,0.03) !important;
    border-left: 3px solid var(--qgo-primary);
}

.feature-matrix .table tr[style*="background-color: #f8fafc"]:hover {
    background: rgba(13,148,136,0.05) !important;
}

.feature-matrix .table tr[style*="background-color: #f8fafc"] td:first-child {
    padding-left: 1rem;
}

.feature-matrix .table tr[style*="background-color: #f8fafc"] td {
    color: #f1f5f9; /* Lighter text for premium feature rows */
}

/* Responsive table */
@media (max-width: 768px) {
    .feature-matrix .table {
        font-size: 0.8rem;
    }
    
    .feature-matrix .table th,
    .feature-matrix .table td {
        padding: 0.5rem 0.4rem;
    }
    
    .feature-matrix .table th {
        font-size: 0.75rem;
    }
    
    .feature-matrix .table td > div {
        min-height: 2rem;
        gap: 0.15rem;
    }
    
    .feature-matrix .table td > div > span:first-child {
        font-size: 1rem;
    }
    
    .feature-matrix .table td > div > span:last-child {
        font-size: 0.7rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 640px) {
    .feature-matrix {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .feature-matrix .table {
        min-width: 500px;
    }
}

/* Accessibility highlight section styles */
.accessibility-highlight {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(13,148,136,0.08), rgba(56,189,248,0.04));
    border-radius: var(--radius);
    border-left: 4px solid var(--qgo-primary);
}

.accessibility-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.feature-badge {
    background: rgba(13,148,136,0.12);
    color: var(--qgo-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(13,148,136,0.2);
}

.accessibility-callout {
    padding: 1.5rem;
    background: rgba(255,255,255,0.02);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.accessibility-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.accessibility-checklist li {
    padding: 0.3rem 0;
    color: #e2e8f0;
    font-size: 0.9rem;
}

.qgo-secondary {
    background: rgba(255,255,255,0.08);
    color: var(--qgo-primary);
    border: 1px solid rgba(13,148,136,0.3);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.2s ease;
}

.qgo-secondary:hover {
    background: rgba(13,148,136,0.12);
    border-color: rgba(13,148,136,0.5);
    transform: translateY(-1px);
    text-decoration: none;
}

/* Enhanced license badge for accessibility emphasis */
.license-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .25rem .5rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(13,148,136,0.12), rgba(56,189,248,0.06));
    color: var(--qgo-primary);
    font-weight: 700;
    font-size: .9rem;
    border: 1px solid rgba(13,148,136,0.06);
}

@media (max-width: 768px) {
    .accessibility-features {
        justify-content: center;
    }
    
    .accessibility-highlight {
        padding: 1rem;
        text-align: center;
    }
    
    .accessibility-callout {
        padding: 1rem;
        margin-top: 1rem;
    }
}
