/* Texas Cyber Technologies — main stylesheet */
:root {
  --bg: #0a0e17;
  --bg-alt: #111827;
  --bg-card: #1A1A2E;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(41, 182, 246, 0.35);
  --accent: #29b6f6;
  --accent-dark: #0097A7;
  --accent-glow: rgba(41, 182, 246, 0.15);
  --text: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --success: #34d399;
  --error: #f87171;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --nav-h: 76px;
  --max-w: 1200px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #7dd3fc; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; color: var(--text-muted); }
ul { margin: 0; padding: 0; list-style: none; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--accent); color: #000; padding: 8px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.6rem; border-radius: var(--radius-sm);
  font-family: inherit; font-weight: 600; font-size: 1rem; line-height: 1;
  border: 1px solid transparent; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #04131d; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 24px var(--accent-glow); }
.btn-outline { background: transparent; color: var(--text); border-color: rgba(255,255,255,.25); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn[disabled] { opacity: .7; cursor: not-allowed; transform: none; }
.btn-group { display: flex; flex-wrap: wrap; gap: 1rem; }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(0,0,0,.25); border-top-color: #04131d;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(10, 14, 23, 0.55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.navbar.scrolled { background: #0a0e17; border-bottom-color: var(--border); box-shadow: 0 4px 20px rgba(0,0,0,.4); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.nav-logo img { height: 48px; width: auto; }
.nav-links { display: flex; align-items: center; gap: .35rem; }
.nav-links a {
  display: block; padding: .5rem .9rem; border-radius: 6px;
  color: var(--text-muted); font-weight: 500; font-size: .95rem;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.04); }
.nav-links a.active { color: var(--accent); background: var(--accent-glow); }
.nav-links .nav-cta { margin-left: .5rem; }
.nav-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--text);
}
.nav-toggle svg { width: 28px; height: 28px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: calc(var(--nav-h) + 60px) 0 80px; overflow: hidden;
}
.page-hero { min-height: auto; padding: calc(var(--nav-h) + 80px) 0 70px; text-align: center; }
.page-hero p { max-width: 680px; margin: 0 auto; font-size: 1.1rem; }
.grid-bg::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(41,182,246,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(41,182,246,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.grid-bg::after {
  content: ""; position: absolute; width: 600px; height: 600px; border-radius: 50%;
  top: -200px; right: -150px; pointer-events: none;
  background: radial-gradient(circle, rgba(41,182,246,.12), transparent 65%);
}
.hero > .container, .page-hero > .container { position: relative; z-index: 1; }
.hero-content { max-width: 780px; }
.hero-logo { height: 84px; width: auto; margin-bottom: 2rem; }
.hero h1 { margin-bottom: 1.25rem; }
.hero-sub { font-size: 1.15rem; max-width: 620px; margin-bottom: 2.25rem; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-header { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-header p { font-size: 1.05rem; }
.section-label {
  display: inline-block; font-family: var(--font-mono); font-size: .875rem;
  color: var(--accent); margin-bottom: .75rem; letter-spacing: .02em;
}

/* ---------- Stats ---------- */
.stats { padding: 0; margin-top: -40px; position: relative; z-index: 2; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.stat { padding: 32px 20px; text-align: center; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--accent); line-height: 1.1; font-family: var(--font-mono); }
.stat-label { color: var(--text-muted); font-size: .95rem; margin-top: .35rem; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); }
.card {
  display: block; position: relative;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; color: inherit;
  transition: transform .25s ease, border-color .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: 0 16px 40px rgba(0,0,0,.4), 0 0 0 1px rgba(41,182,246,.1); }
a.card:hover { color: inherit; }
.card p { margin-bottom: 0; }
.card-icon {
  width: 52px; height: 52px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-glow); color: var(--accent); margin-bottom: 1.25rem;
  border: 1px solid rgba(41,182,246,.2);
}
.card-icon svg { width: 26px; height: 26px; }
.card-link { display: inline-flex; align-items: center; gap: .35rem; margin-top: 1.25rem; font-weight: 600; font-size: .95rem; color: var(--accent); }
.card-link svg { width: 16px; height: 16px; transition: transform .2s; }
.card:hover .card-link svg { transform: translateX(4px); }

/* ---------- Project cards ---------- */
.project-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.project-visual {
  aspect-ratio: 16 / 9; display: grid; place-items: center;
  background:
    linear-gradient(rgba(41,182,246,.05) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(41,182,246,.05) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(135deg, #0d1424, #16213a);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); color: var(--accent); font-size: 1.1rem;
}
.project-visual span { opacity: .85; }
.project-body { padding: 28px; display: flex; flex-direction: column; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.tag {
  font-family: var(--font-mono); font-size: .75rem; padding: .25rem .65rem; border-radius: 999px;
  background: var(--accent-glow); color: var(--accent); border: 1px solid rgba(41,182,246,.25);
}
.project-body p { margin-bottom: 1rem; }
.project-card.hidden { display: none; }

.filter-bar { display: flex; justify-content: center; flex-wrap: wrap; gap: .75rem; margin-bottom: 48px; }
.filter-btn {
  font-family: var(--font-mono); font-size: .9rem; padding: .6rem 1.25rem; border-radius: 999px;
  background: transparent; color: var(--text-muted); border: 1px solid var(--border); cursor: pointer;
  transition: all .2s;
}
.filter-btn:hover { color: #fff; border-color: rgba(255,255,255,.25); }
.filter-btn.active { background: var(--accent); color: #04131d; border-color: var(--accent); font-weight: 600; }

/* ---------- Checklists ---------- */
.checklist li { position: relative; padding-left: 1.85rem; margin-bottom: .6rem; color: var(--text-muted); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 1.1rem; height: 1.1rem;
  background-color: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4.5 12.75l6 6 9-13.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4.5 12.75l6 6 9-13.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.project-body .checklist li { font-size: .92rem; margin-bottom: .4rem; }

/* ---------- Services detail ---------- */
.service-detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  padding: 64px 0; border-bottom: 1px solid var(--border);
  scroll-margin-top: calc(var(--nav-h) + 20px);
}
.service-detail:last-child { border-bottom: 0; }
.service-detail:nth-child(even) .service-text { order: 2; }
.service-text .card-icon { margin-bottom: 1rem; }
.service-text p { font-size: 1.05rem; }
.service-features {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px;
}
.service-features h4 { font-family: var(--font-mono); font-weight: 500; font-size: .9rem; color: var(--accent); margin-bottom: 1.25rem; }

.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.process-step { text-align: left; }
.process-num { font-family: var(--font-mono); font-size: .85rem; color: var(--accent); margin-bottom: .75rem; display: block; }
.process-step h3 { display: flex; align-items: center; gap: .5rem; }
.process-step .arrow { color: var(--text-dim); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.about-text p { font-size: 1.05rem; }
.about-visual { text-align: center; padding: 40px; }
.about-visual img { width: 100%; max-width: 360px; margin: 0 auto 1.5rem; border-radius: var(--radius-sm); }
.about-visual h3 { margin-bottom: .25rem; }
.about-visual .location { display: inline-flex; align-items: center; gap: .4rem; color: var(--text-muted); font-family: var(--font-mono); font-size: .9rem; }
.about-visual .location svg { width: 16px; height: 16px; color: var(--accent); }
.values-grid { grid-template-columns: repeat(4, 1fr); }
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.why-item { display: flex; gap: 1rem; align-items: flex-start; }
.why-item .card-icon { flex-shrink: 0; margin-bottom: 0; width: 44px; height: 44px; }
.why-item .card-icon svg { width: 22px; height: 22px; }
.why-item h3 { font-size: 1.1rem; margin-bottom: .35rem; }

/* ---------- CTA ---------- */
.cta {
  text-align: center; padding: 72px 32px; border-radius: 16px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(41,182,246,.14), rgba(0,151,167,.08)), var(--bg-card);
  border: 1px solid var(--border-strong);
}
.cta p { max-width: 560px; margin: 0 auto 2rem; font-size: 1.1rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; align-items: start; }
.contact-info { display: grid; gap: 16px; }
.info-card { display: flex; gap: 1rem; align-items: flex-start; padding: 22px; }
.info-card .card-icon { margin-bottom: 0; flex-shrink: 0; width: 44px; height: 44px; }
.info-card .card-icon svg { width: 22px; height: 22px; }
.info-card h3 { font-size: 1rem; margin-bottom: .2rem; }
.info-card p, .info-card a { font-size: .95rem; margin: 0; }
.info-card .small { font-size: .85rem; color: var(--text-dim); }

.contact-form { padding: 36px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: .9rem; font-weight: 500; margin-bottom: .45rem; color: var(--text); }
.form-group label .opt { color: var(--text-dim); font-weight: 400; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: .8rem 1rem; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
.form-group select { appearance: none; -webkit-appearance: none; padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 16px; }
.form-group textarea { min-height: 150px; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-dim); }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { display: none; margin-top: 20px; padding: 14px 18px; border-radius: var(--radius-sm); font-size: .95rem; }
.form-status.show { display: flex; gap: .6rem; align-items: flex-start; }
.form-status svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.form-status.success { background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.35); color: var(--success); }
.form-status.error { background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.35); color: var(--error); }
.contact-form .btn { width: 100%; }

/* ---------- 404 ---------- */
.notfound { min-height: 100vh; display: flex; align-items: center; text-align: center; padding: calc(var(--nav-h) + 40px) 0 60px; position: relative; overflow: hidden; }
.notfound-code { font-family: var(--font-mono); font-size: clamp(5rem, 18vw, 9rem); font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 1rem; text-shadow: 0 0 40px rgba(41,182,246,.35); }
.notfound p { max-width: 480px; margin: 0 auto 2rem; }

/* ---------- Footer ---------- */
.footer { background: #070a11; border-top: 1px solid var(--border); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 48px; margin-bottom: 48px; }
.footer-logo { height: 48px; width: auto; margin-bottom: 1rem; }
.footer-brand p { max-width: 340px; font-size: .95rem; }
.footer h4 { font-family: var(--font-mono); font-weight: 500; font-size: .85rem; color: var(--accent); margin-bottom: 1rem; }
.footer-links li, .footer-contact li { margin-bottom: .6rem; }
.footer-links a, .footer-contact a, .footer-contact span { color: var(--text-muted); font-size: .95rem; }
.footer-links a:hover, .footer-contact a:hover { color: var(--accent); }
.footer-contact li { display: flex; gap: .6rem; align-items: flex-start; }
.footer-contact svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; margin-top: 3px; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; text-align: center; }
.footer-bottom p { margin: 0; font-size: .875rem; color: var(--text-dim); }

/* ---------- Animations ---------- */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.fade-in.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: .1s; } .delay-2 { transition-delay: .2s; } .delay-3 { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; transition: none; }
  .card, .btn { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .card-grid, .values-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .service-detail { gap: 40px; }
  .about-grid { gap: 40px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #0a0e17; border-bottom: 1px solid var(--border);
    padding: 12px 24px 24px; box-shadow: 0 20px 30px rgba(0,0,0,.5);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav-links.open { transform: none; opacity: 1; visibility: visible; }
  .nav-links a { padding: .9rem 1rem; font-size: 1.05rem; }
  .nav-links .nav-cta { margin: .75rem 0 0; }
  .navbar.menu-open { background: #0a0e17; }

  .service-detail, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .service-detail:nth-child(even) .service-text { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .section { padding: 72px 0; }
  .card-grid, .values-grid, .process-grid, .why-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .card { padding: 24px; }
  .project-card { padding: 0; }
  .contact-form { padding: 24px; }
  .hero { min-height: auto; padding-top: calc(var(--nav-h) + 48px); padding-bottom: 88px; }
  .hero-logo { height: 64px; }
  .btn-group .btn { flex: 1 1 100%; }
  .stat { padding: 24px 12px; }
  .stat-value { font-size: 1.6rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .cta { padding: 52px 20px; }
}

/* ---------- Live site previews & phone modal ---------- */
.btn-sm { padding: .7rem 1.15rem; font-size: .92rem; }
.project-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: auto; padding-top: 1.25rem; }
.site-preview { position: relative; overflow: hidden; display: block; background: #101715; }
.site-preview iframe {
  position: absolute; top: 0; left: 0; width: 1440px; height: 810px; border: 0;
  transform-origin: 0 0; transform: scale(var(--preview-scale, .25)); pointer-events: none;
}

.modal { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 8, 14, .85); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal-dialog { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.modal-close {
  align-self: flex-end; margin-bottom: 10px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--bg-card); color: var(--text); border: 1px solid var(--border);
}
.modal-close:hover { border-color: var(--accent); color: var(--accent); }
.modal-close svg { width: 22px; height: 22px; }
.phone-frame {
  width: 414px; height: 868px; padding: 12px; border-radius: 48px;
  background: #05070c; border: 2px solid #2a3142; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(41,182,246,.15);
  transform-origin: top center; transform: scale(var(--phone-scale, 1));
  margin-bottom: calc((var(--phone-scale, 1) - 1) * 868px);
}
.phone-frame iframe { width: 390px; height: 844px; border: 0; border-radius: 36px; background: #101715; display: block; }
body.modal-open { overflow: hidden; }
