/* BLUEGEM: Simple, smart & secure IT. No external fonts or frameworks. */
:root {
  --bg: #070b1a;
  --bg-2: #0b1126;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .09);
  --text: #e8ecf8;
  --muted: #9aa6c7;
  --sapphire: #2f6bff;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --ice: #a5f3fc;
  --grad: linear-gradient(120deg, #22d3ee 0%, #2f6bff 50%, #8b5cf6 100%);
  --radius: 18px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; font-size: 17px; overflow-x: hidden; }
svg { display: block; }
a { color: var(--ice); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.12; letter-spacing: -.02em; color: #fff; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); font-weight: 800; letter-spacing: -.045em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 750; letter-spacing: -.035em; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
::selection { background: rgba(47, 107, 255, .45); color: #fff; }

.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: absolute; left: -999px; top: 0; background: #fff; color: var(--bg); padding: .6rem 1rem; z-index: 100; border-radius: 8px; }
.skip-link:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.35rem; border-radius: 999px; font: inherit; font-weight: 650; font-size: 1rem; text-decoration: none; color: #fff; border: 1px solid var(--line); background: var(--surface); transition: transform .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease; }
.btn svg { width: 18px; height: 18px; transition: transform .2s ease; }
.btn:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .25); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--grad); border-color: transparent; box-shadow: 0 10px 30px -10px rgba(47, 107, 255, .8); }
.btn-primary:hover { box-shadow: 0 14px 36px -10px rgba(34, 211, 238, .7); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: .5rem 1rem; font-size: .92rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(7, 11, 26, .72); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: #fff; }
.brand-mark { width: 34px; height: 34px; filter: drop-shadow(0 4px 12px rgba(47, 107, 255, .55)); }
.brand-word { font-weight: 800; font-size: 1.2rem; letter-spacing: .12em; }
.brand-word span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 550; transition: color .2s; }
.nav a:not(.btn):hover { color: #fff; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(4rem, 8vw, 7rem); isolation: isolate; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 70%); }
.aurora { position: absolute; inset: -20% -10% auto -10%; height: 140%; z-index: -2; filter: blur(70px); opacity: .55; }
.aurora span { position: absolute; border-radius: 50%; animation: drift 18s ease-in-out infinite alternate; }
.aurora span:nth-child(1) { width: 42vw; height: 42vw; left: 50%; top: 0; background: #1d4ed8; }
.aurora span:nth-child(2) { width: 30vw; height: 30vw; left: 70%; top: 25%; background: #0891b2; animation-duration: 22s; animation-delay: -6s; }
.aurora span:nth-child(3) { width: 26vw; height: 26vw; left: 35%; top: 40%; background: #6d28d9; animation-duration: 26s; animation-delay: -12s; opacity: .7; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-6vw, 4vw) scale(1.12); } 100% { transform: translate(4vw, -3vw) scale(.92); } }

.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--mono); font-size: .8rem; letter-spacing: .04em; color: var(--ice); background: var(--surface); border: 1px solid var(--line); padding: .4rem .85rem; border-radius: 999px; margin-bottom: 1.6rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(34, 211, 238, .7); animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, .6); } 80%, 100% { box-shadow: 0 0 0 10px rgba(34, 211, 238, 0); } }
.amp { font-weight: 300; color: var(--muted); }
.grad { background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 8s ease-in-out infinite alternate; }
@keyframes sheen { to { background-position: 100% 0; } }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2rem 0 2rem; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; }
.tags li { font-family: var(--mono); font-size: .78rem; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: .3rem .6rem; background: rgba(255, 255, 255, .02); }

.hero-gem { position: relative; aspect-ratio: 400 / 360; max-width: 480px; width: 100%; justify-self: center; }
.gem-glow { position: absolute; inset: 15% 10% 5%; background: radial-gradient(circle, rgba(47, 107, 255, .65), rgba(34, 211, 238, .25) 45%, transparent 70%); filter: blur(30px); animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.08); opacity: .75; } }
.gem-big { position: relative; width: 100%; height: auto; animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-12px) rotate(-1deg); } }
.f { stroke: none; animation: shimmer 6s ease-in-out infinite; }
.f1 { fill: #60a5fa; } .f2 { fill: #93c5fd; animation-delay: -1s; } .f3 { fill: #38bdf8; animation-delay: -2s; }
.f4 { fill: #bae6fd; animation-delay: -3s; } .f5 { fill: #3b82f6; animation-delay: -4s; } .f6 { fill: #7dd3fc; animation-delay: -5s; }
.f7 { fill: #2563eb; animation-delay: -1.5s; } .f8 { fill: #1e40af; animation-delay: -2.5s; } .f9 { fill: #2f6bff; animation-delay: -3.5s; }
.f10 { fill: #1d4ed8; animation-delay: -4.5s; } .f11 { fill: #172554; animation-delay: -5.5s; }
@keyframes shimmer { 0%, 100% { opacity: 1; } 50% { opacity: .72; } }
.gem-edge { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: 1.5; stroke-linejoin: round; }
.gem-lines { fill: none; stroke: rgba(255, 255, 255, .28); stroke-width: 1; }
.sparkle { fill: #fff; transform-box: fill-box; transform-origin: center; animation: twinkle 3.2s ease-in-out infinite; }
.s2 { animation-delay: -1.1s; } .s3 { animation-delay: -2.2s; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1); } }
.chip { position: absolute; font-family: var(--mono); font-size: .8rem; font-weight: 600; color: #fff; padding: .45rem .8rem; border-radius: 10px; background: rgba(11, 17, 38, .75); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); animation: float 7s ease-in-out infinite; }
.chip::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: .45rem; vertical-align: middle; }
.chip-a { left: -4%; top: 14%; animation-delay: -2s; } .chip-a::before { background: var(--cyan); }
.chip-b { right: -2%; top: 48%; animation-delay: -4s; } .chip-b::before { background: var(--sapphire); }
.chip-c { left: 12%; bottom: 4%; animation-delay: -1s; } .chip-c::before { background: var(--violet); }

/* Sections */
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; position: relative; }
.section-alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 3rem; }
.label { font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.label span { color: var(--cyan); margin-right: .5rem; }
.sub { color: var(--muted); font-size: 1.08rem; }

/* Services: bento grid */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.1rem; }
.card { position: relative; grid-column: span 2; padding: 1.8rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .25s ease, border-color .25s ease, background-color .25s ease; }
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: var(--grad); opacity: 0; transition: opacity .25s ease; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); pointer-events: none; }
.card:hover { transform: translateY(-4px); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }
.card-wide { grid-column: span 4; }
.card-half { grid-column: span 3; }
.card-ai { grid-column: span 6; background: radial-gradient(120% 140% at 100% 0%, rgba(139, 92, 246, .22), transparent 55%), radial-gradient(100% 120% at 0% 100%, rgba(34, 211, 238, .14), transparent 55%), var(--surface); }
.card-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.2rem; background: linear-gradient(135deg, rgba(34, 211, 238, .16), rgba(47, 107, 255, .2)); border: 1px solid rgba(125, 211, 252, .2); }
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--ice); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mini { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: 1.2rem 0 0; }
.mini li { font-size: .82rem; color: var(--text); padding: .25rem .65rem; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.badge { position: absolute; top: 1.4rem; right: 1.4rem; font-family: var(--mono); font-size: .72rem; color: #e9d5ff; background: rgba(139, 92, 246, .2); border: 1px solid rgba(139, 92, 246, .45); padding: .25rem .6rem; border-radius: 999px; }

/* Approach */
.approach { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.step { padding: 2rem 1.8rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.step p { color: var(--muted); margin: 0; }
.step h3 { font-size: 1.6rem; letter-spacing: -.03em; }
.step-n { display: inline-block; font-family: var(--mono); font-size: .8rem; color: var(--bg); background: var(--grad); padding: .2rem .55rem; border-radius: 6px; margin-bottom: 1.2rem; font-weight: 700; }
.terminal { margin-top: 1.6rem; border-radius: var(--radius); border: 1px solid var(--line); background: #050814; overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: .45rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #334155; }
.term-bar i:nth-child(1) { background: #f87171; } .term-bar i:nth-child(2) { background: #fbbf24; } .term-bar i:nth-child(3) { background: #34d399; }
.term-bar span { margin-left: .6rem; font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.terminal pre { margin: 0; padding: 1.2rem 1.4rem; overflow-x: auto; font-family: var(--mono); font-size: .9rem; line-height: 1.8; color: var(--text); }
.terminal .p { color: var(--cyan); } .terminal .c { color: #64748b; } .terminal .ok { color: #34d399; }

/* Products */
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.product { position: relative; display: flex; flex-direction: column; padding: 2.2rem; border-radius: 22px; text-decoration: none; color: var(--text); background: linear-gradient(160deg, rgba(47, 107, 255, .18), rgba(7, 11, 26, .2) 60%), var(--surface); border: 1px solid rgba(96, 165, 250, .25); overflow: hidden; transition: transform .25s ease, border-color .25s ease; }
.product::after { content: ""; position: absolute; width: 220px; height: 220px; right: -60px; top: -60px; background: conic-gradient(from 200deg, #22d3ee, #2f6bff, #8b5cf6, #22d3ee); opacity: .18; clip-path: polygon(50% 0, 100% 35%, 80% 100%, 20% 100%, 0 35%); transition: transform .6s ease, opacity .3s; }
.product:hover { transform: translateY(-4px); border-color: rgba(125, 211, 252, .55); }
.product:hover::after { transform: rotate(18deg) scale(1.08); opacity: .3; }
.product-oss { background: linear-gradient(160deg, rgba(34, 211, 238, .14), rgba(7, 11, 26, .2) 60%), var(--surface); border-color: rgba(34, 211, 238, .25); }
.product h3 { font-size: 1.9rem; letter-spacing: -.035em; }
.product p { color: var(--muted); flex: 1; }
.product-tag { align-self: flex-start; font-family: var(--mono); font-size: .75rem; color: var(--ice); border: 1px solid var(--line); background: rgba(255, 255, 255, .04); padding: .25rem .6rem; border-radius: 999px; margin-bottom: 1.2rem; }
.product-link { display: inline-flex; align-items: center; gap: .45rem; font-weight: 650; color: #fff; overflow-wrap: anywhere; }
.product-link svg { width: 16px; height: 16px; flex: none; color: var(--cyan); }

/* About */
.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: start; }
.about-copy p { color: var(--muted); font-size: 1.05rem; }
.facts { margin: 0; display: grid; gap: .8rem; }
.facts div { padding: 1.1rem 1.3rem; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.facts dt { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cyan); }
.facts dd { margin: .25rem 0 0; color: #fff; font-weight: 600; }

/* Contact */
.contact { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; padding: clamp(2rem, 5vw, 3.5rem); border-radius: 28px; background: radial-gradient(120% 120% at 100% 0%, rgba(139, 92, 246, .28), transparent 50%), radial-gradient(120% 120% at 0% 100%, rgba(34, 211, 238, .2), transparent 50%), linear-gradient(135deg, #0d1735, #0a1028); border: 1px solid rgba(125, 211, 252, .22); }
.contact-copy p { color: var(--muted); margin: 0; }
.mail { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .2rem 1rem; padding: 1.6rem 1.8rem; border-radius: 20px; text-decoration: none; color: #fff; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); transition: transform .25s ease, background-color .25s ease; }
.mail:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .1); }
.mail-label { font-family: var(--mono); font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.mail-addr { grid-column: 1; font-size: clamp(1.2rem, 2.6vw, 1.7rem); font-weight: 750; letter-spacing: -.02em; overflow-wrap: anywhere; }
.mail svg { grid-column: 2; grid-row: 1 / span 2; width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: var(--grad); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 2.2rem; color: var(--muted); font-size: .92rem; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 1.4rem 3rem; align-items: start; }
.footer-tag { margin: .7rem 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: flex-end; }
.footer-links a { color: var(--text); text-decoration: none; }
.footer-links a:hover { color: var(--ice); }
.footer-legal, .footer-note { grid-column: 1 / -1; margin: 0; }
.footer-legal { padding-top: 1.4rem; border-top: 1px solid var(--line); }
.footer-note { color: #6b7799; }

/* Simple content page (privacy) */
.page { padding: clamp(3rem, 7vw, 5rem) 0; }
.page .wrap { max-width: 780px; }
.page h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.page h2 { font-size: 1.35rem; margin-top: 2.2rem; letter-spacing: -.01em; }
.page p, .page li { color: var(--muted); }
.todo { background: rgba(251, 191, 36, .1); border: 1px solid rgba(251, 191, 36, .35); color: #fde68a; padding: .9rem 1.1rem; border-radius: 12px; font-size: .92rem; }

/* Reveal on scroll (only when JS is available; content is visible without JS) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 980px) {
  .hero-inner, .about, .contact { grid-template-columns: 1fr; }
  .hero-gem { max-width: 380px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .card, .card-half, .card-ai { grid-column: span 1; }
  .card-wide { grid-column: span 2; }
  .approach { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav a:not(.btn) { display: none; }
  .products { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .bento { grid-template-columns: 1fr; }
  .card, .card-wide, .card-half, .card-ai { grid-column: span 1; }
  .badge { position: static; display: inline-block; margin-bottom: 1rem; }
  .hero-cta .btn { flex: 1 1 100%; justify-content: center; }
  .chip-a { left: 0; } .chip-b { right: 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .mail { padding: 1.3rem 1.3rem; }
}

/* Respect reduced motion: no animations, no smooth scrolling, no reveal effect */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

.card-ai p { max-width: 68ch; }
.nowrap { white-space: nowrap; }
@media (max-width: 600px) { .terminal pre { font-size: .8rem; padding: 1rem 1.1rem; } }
