/* T&D Software — brand colors come from the logo: cyan→blue "T&D", coral "Software". */
:root {
  --navy: #0b1b33;
  --navy-2: #12284a;
  --ink: #14213d;
  --text: #3d4a63;
  --muted: #6b778f;
  --line: #e3e8f0;
  --bg: #ffffff;
  --bg-soft: #f5f8fc;
  --cyan: #1fd8d8;
  --blue: #3b8fe0;
  --coral: #f2694f;
  --coral-dark: #dc5338;
  --green: #22a06b;
  --grad: linear-gradient(100deg, #18c8d6 0%, #3b8fe0 60%, #7b5be0 100%);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 33, 61, .06), 0 8px 24px rgba(16, 33, 61, .08);
  --shadow-lg: 0 30px 60px -20px rgba(11, 27, 51, .35);
  --wrap: 1180px;
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.65; font-size: 16px; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .8em 1.4em; border-radius: 999px; font-weight: 600; font-size: .98rem; border: 1.5px solid transparent; transition: transform .15s, background .15s, box-shadow .15s, border-color .15s; white-space: nowrap; cursor: pointer; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 6px 18px -6px rgba(242, 105, 79, .7); }
.btn-primary:hover { background: var(--coral-dark); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost-light:hover { border-color: #fff; }
.btn-sm { padding: .55em 1.1em; font-size: .9rem; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand img { height: 42px; width: auto; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--coral); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: #fff; }
.lang button { border: 0; background: none; font: 600 .78rem var(--font); color: var(--muted); padding: .35em .7em; border-radius: 999px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.menu-btn { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* Hero */
.hero { position: relative; padding: 72px 0 40px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(600px 380px at 85% 20%, rgba(59, 143, 224, .16), transparent 70%),
  radial-gradient(500px 340px at 10% 90%, rgba(31, 216, 216, .14), transparent 70%),
  radial-gradient(420px 300px at 60% 100%, rgba(242, 105, 79, .10), transparent 70%); }
.hero-bg::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(20, 33, 61, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(20, 33, 61, .045) 1px, transparent 1px); background-size: 40px 40px; mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin-bottom: 14px; }
.eyebrow-light { color: var(--cyan); }
.hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.25rem); font-weight: 800; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-visual { position: relative; min-height: 420px; }
.frame { background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); margin: 0; }
.frame-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: #f1f4f9; border-bottom: 1px solid var(--line); }
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: #d5dbe5; }
.frame-bar i:nth-child(1) { background: #ff6b5f; } .frame-bar i:nth-child(2) { background: #ffc24b; } .frame-bar i:nth-child(3) { background: #2bc840; }
.frame-bar span { margin: 0 auto; font-size: .72rem; color: var(--muted); background: #fff; border-radius: 6px; padding: 1px 14px; transform: translateX(-20px); }
.frame-back { position: absolute; top: 0; right: -40px; width: 92%; transform: rotate(2deg); }
.frame-front { position: absolute; bottom: 0; left: 0; width: 78%; transform: rotate(-2deg); }
.facts { list-style: none; padding: 0; margin: 64px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.facts li { background: rgba(255, 255, 255, .8); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.facts strong { display: block; color: var(--ink); font-size: clamp(1.05rem, 1.7vw, 1.35rem); font-weight: 800; letter-spacing: -.02em; }
.facts span { font-size: .9rem; color: var(--muted); }

/* Sections */
.section { padding: 96px 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head h2, .about h2, .contact h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); font-weight: 800; }
.section-lead { font-size: 1.08rem; }

/* Products */
.products { background: var(--bg-soft); }
.product { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 44px; box-shadow: var(--shadow); }
.product + .product { margin-top: 32px; }
.product-rev .product-copy { order: 2; }
.product-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tag { font-size: .76rem; font-weight: 600; padding: .3em .8em; border-radius: 999px; background: #eef2f7; color: var(--text); }
.tag-blue { background: rgba(59, 143, 224, .12); color: #1f6fc0; }
.tag-coral { background: rgba(242, 105, 79, .12); color: #c4472e; }
.tag-live { background: rgba(34, 160, 107, .12); color: #17804f; }
.tag-live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 6px; vertical-align: 1px; }
.product-name { font-size: 2.2rem; font-weight: 800; margin-bottom: .2em; }
.product-tagline { font-size: 1.12rem; color: var(--ink); font-weight: 500; }
.checks { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before { content: ""; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; border-radius: 50%; background: rgba(31, 216, 216, .16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.6L14 7.6' fill='none' stroke='%231a9fb0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }
#martial .checks li::before { background-color: rgba(242, 105, 79, .14); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.6L14 7.6' fill='none' stroke='%23dc5338' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.stack { font-size: .85rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.product-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.product-media { min-width: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tabs button { flex: none; border: 1px solid var(--line); background: #fff; color: var(--text); font: 500 .86rem var(--font); padding: .45em 1em; border-radius: 999px; cursor: pointer; transition: all .15s; }
.tabs button:hover { border-color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.frame-lg { box-shadow: 0 24px 48px -24px rgba(11, 27, 51, .35); }
.zoom { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; width: 100%; }
.zoom img { width: 100%; transition: opacity .2s; }
.zoom img.fading { opacity: 0; }
.caption { font-size: .82rem; color: var(--muted); margin-top: 12px; }

/* Services */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; background: #fff; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { font-size: 1.08rem; margin-top: 18px; }
.card p { font-size: .95rem; margin: 0; }
.card-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; }
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-1 { background: rgba(31, 216, 216, .15); color: #129aa8; }
.ic-2 { background: rgba(59, 143, 224, .14); color: #2a76c6; }
.ic-3 { background: rgba(123, 91, 224, .13); color: #6a48d4; }
.ic-4 { background: rgba(242, 105, 79, .13); color: #d4513a; }

/* Portfolio */
.portfolio { background: var(--bg-soft); }
.pf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pf { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 18px; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.pf:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.pf-shots { position: relative; height: 250px; background: linear-gradient(160deg, #e6eef9, #f6f9fd); border-radius: 10px; margin-bottom: 16px; overflow: hidden; }
.pf-shots img { position: absolute; left: 50%; bottom: -36px; width: 40%; aspect-ratio: 9 / 17; object-fit: cover; object-position: top; border-radius: 10px; box-shadow: 0 10px 22px -8px rgba(11, 27, 51, .45); background: #fff; transition: transform .3s; }
.pf-shots img:nth-child(1) { transform: translateX(-50%); z-index: 3; bottom: -18px; }
.pf-shots img:nth-child(2) { transform: translateX(-118%) rotate(-8deg); z-index: 2; }
.pf-shots img:nth-child(3) { transform: translateX(18%) rotate(8deg); z-index: 2; }
.pf:hover .pf-shots img:nth-child(2) { transform: translateX(-128%) rotate(-11deg); }
.pf:hover .pf-shots img:nth-child(3) { transform: translateX(28%) rotate(11deg); }
.pf h3 { font-size: 1.08rem; margin: 0 6px .3em; }
.pf p { font-size: .92rem; flex: 1; margin: 0 6px 12px; }
.pf-links { display: flex; gap: 14px; font-size: .86rem; font-weight: 600; margin: 0 6px; }
.pf-next { border: 1.5px dashed #c5d0e0; background: transparent; justify-content: center; text-align: center; padding: 28px 22px; color: var(--text); }
.pf-next:hover { text-decoration: none; border-color: var(--coral); }
.pf-next p { flex: 0; }
.pf-next-mark { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 2rem; line-height: 56px; font-weight: 300; }
.pf-next-cta { color: var(--coral); font-weight: 700; font-size: .92rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: start; }
.about-copy p { font-size: 1.08rem; }

/* Contact */
.contact { background: var(--navy); color: #c7d2e5; position: relative; overflow: hidden; }
.contact::before { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -200px; background: radial-gradient(circle, rgba(31, 216, 216, .22), transparent 65%); }
.contact h2 { color: #fff; }
.contact-grid { position: relative; display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.contact-lead { font-size: 1.08rem; max-width: 30em; }
.contact-list { list-style: none; margin: 0; padding: 28px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; background: rgba(255, 255, 255, .04); display: grid; gap: 20px; }
.contact-list li { display: flex; flex-direction: column; gap: 2px; }
.contact-list span { font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8798b5; }
.contact-list a, .contact-list address { color: #fff; font-style: normal; font-size: 1.02rem; }

/* Footer */
.footer { background: #08152a; color: #8798b5; font-size: .88rem; }
.footer-inner { display: flex; align-items: center; gap: 14px; padding-top: 22px; padding-bottom: 22px; }
.footer p { margin: 0; }
.footer nav { margin-left: auto; display: flex; gap: 20px; }
.footer a { color: #c7d2e5; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1400px, 96vw); max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(8, 21, 42, .82); }
.lightbox img { max-height: 90vh; width: auto; border-radius: 10px; box-shadow: var(--shadow-lg); }
.lb-close { position: absolute; top: -18px; right: -18px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .reveal { opacity: 1; transform: none; transition: none; } }

/* Responsive
   ≤1080 tablet: hamburger menu, single-column hero and products
   ≤900  small tablet: 2-column facts, stacked about/contact
   ≤600  phone */
@media (max-width: 1080px) {
  .section { padding: 80px 0; }
  .nav-links { position: fixed; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 24px 16px; box-shadow: var(--shadow); transform: translateY(-120%); visibility: hidden; transition: transform .25s, visibility .25s; z-index: -1; }
  .nav-links.open { transform: none; visibility: visible; }
  .nav-links a { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-actions { margin-left: auto; }
  .menu-btn { display: flex; }
  .hero { padding-top: 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-copy { max-width: 720px; }
  .hero-visual { min-height: 0; aspect-ratio: 16 / 10; width: 100%; max-width: 780px; margin: 0 auto; }
  .frame-back { right: 0; width: 86%; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .pf-grid { grid-template-columns: repeat(2, 1fr); }
  .product { grid-template-columns: 1fr; gap: 32px; padding: 36px; }
  .product-rev .product-copy { order: 0; }
  .product .checks { grid-template-columns: 1fr 1fr; column-gap: 28px; }
}
@media (max-width: 900px) {
  .facts { grid-template-columns: repeat(2, 1fr); margin-top: 48px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .nav-links { padding: 8px 16px 16px; }
  .brand img { height: 38px; }
  .hide-sm { display: none; }
  .hero { padding: 36px 0 32px; }
  .hero-grid { gap: 32px; }
  .lead { font-size: 1.05rem; }
  .hero-cta .btn { flex: 1 1 auto; }
  .hero-visual { aspect-ratio: auto; }
  .frame-back { position: relative; right: auto; width: 100%; transform: none; }
  .frame-front { display: none; }
  .frame-bar span { display: none; }
  .facts { gap: 10px; margin-top: 32px; }
  .facts li { padding: 14px; }
  .section { padding: 60px 0; }
  .section-head { margin-bottom: 32px; }
  .product { padding: 22px 16px; border-radius: 16px; }
  .product + .product { margin-top: 20px; }
  .product-name { font-size: 1.8rem; }
  .product .checks { grid-template-columns: 1fr; }
  .product-cta .btn { flex: 1 1 auto; }
  .tabs button { font-size: .8rem; padding: .4em .85em; }
  .cards { grid-template-columns: 1fr; }
  .pf-grid { grid-template-columns: 1fr; }
  .lightbox { max-width: 100vw; }
  .lightbox img { border-radius: 0; }
  .lb-close { top: 8px; right: 8px; }
  .contact-list { padding: 20px; }
  .footer-inner { flex-wrap: wrap; }
  .footer nav { margin-left: 0; width: 100%; }
}
