/* ══════════════════════════════════════════════
   TionSoft — design system
   Dark, technical, premium
   ══════════════════════════════════════════════ */

:root {
  --bg: #0a0e12;
  --bg-raised: #10161d;
  --bg-card: #131b24;
  --line: rgba(148, 178, 205, 0.12);
  --line-strong: rgba(148, 178, 205, 0.22);
  --text: #e8eef4;
  --text-muted: #9db0c1;
  --text-faint: #64788a;
  --accent: #3ee6c4;
  --accent-dim: rgba(62, 230, 196, 0.12);
  --accent-glow: rgba(62, 230, 196, 0.35);
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --max-w: 74rem;
  --header-h: 4.5rem;
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Reset / base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0;
}

address {
  font-style: normal;
}

::selection {
  background: var(--accent);
  color: #04251d;
}

/* ── Reveal on scroll ── */
.reveal {
  opacity: 0;
  transform: translateY(1.75rem);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 300;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #04251d;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 1rem;
}

/* ── Header ── */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(10, 14, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(10, 14, 18, 0.9);
  border-bottom-color: var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  height: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav__logo-mark {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__links a {
  position: relative;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}

.nav__links a:hover,
.nav__links a:focus-visible {
  color: var(--text);
}

.nav__cta {
  padding: 0.5rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text) !important;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav__cta:hover,
.nav__cta:focus-visible {
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* ── Hero ── */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding: calc(var(--header-h) + 4rem) 1.5rem 6rem;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 55% 45% at 18% 12%, rgba(62, 230, 196, 0.09), transparent 62%),
    radial-gradient(ellipse 45% 40% at 85% 78%, rgba(56, 120, 190, 0.10), transparent 60%),
    var(--bg);
}

.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(148, 178, 205, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 178, 205, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 75% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 40%, #000 30%, transparent 75%);
}

.hero__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: rgba(16, 22, 29, 0.6);
}

.hero__status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.hero__title {
  max-width: 20ch;
  font-size: clamp(2.75rem, 7vw, 5.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.hero__title em {
  font-style: normal;
  color: var(--accent);
}

.hero__sub {
  max-width: 38rem;
  margin-top: 1.75rem;
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: var(--text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 2.75rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.625rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition:
    transform 0.18s var(--ease),
    background 0.18s var(--ease),
    border-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease),
    color 0.18s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: #04251d;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: #5cefd2;
  box-shadow: 0 0 28px var(--accent-glow);
  color: #04251d;
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(16, 22, 29, 0.5);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.btn .btn__arrow {
  font-family: var(--font-mono);
  transition: transform 0.2s var(--ease);
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

/* ── Hero meta strip ── */
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem 4rem;
  margin-top: 5rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--line);
}

.hero__meta-item {
  min-width: 8rem;
}

.hero__meta-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero__meta-label {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  text-transform: uppercase;
}

/* ── Sections (shared) ── */
.section {
  padding: 7rem 1.5rem;
  border-top: 1px solid var(--line);
}

.section__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.section__tag::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--accent);
}

.section__title {
  max-width: 24ch;
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
}

.section__lead {
  max-width: 40rem;
  margin-top: 1.25rem;
  font-size: 1.125rem;
  color: var(--text-muted);
}

/* ── Services ── */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 3.5rem;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.service {
  padding: 2.25rem;
  background: var(--bg-raised);
  transition: background 0.25s var(--ease);
}

.service:hover {
  background: var(--bg-card);
}

.service__index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

.service__title {
  margin-top: 1rem;
  font-size: 1.375rem;
}

.service__text {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.service__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.service__list li {
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

/* ── Product (HANA) ── */
.section--product {
  background:
    radial-gradient(ellipse 45% 55% at 85% 30%, rgba(62, 230, 196, 0.06), transparent 65%),
    var(--bg-raised);
}

.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.product__badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
}

.product__points {
  display: grid;
  gap: 0.875rem;
  margin-top: 2rem;
}

.product__points li {
  position: relative;
  padding-left: 1.625rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.product__points li::before {
  content: "→";
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
  color: var(--accent);
}

.product__cta {
  display: inline-flex;
  margin-top: 2.25rem;
}

/* Terminal card */
.terminal {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #0b1117;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 2rem 4rem rgba(0, 0, 0, 0.45);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-card);
}

.terminal__dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--line-strong);
}

.terminal__title {
  margin-left: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-faint);
}

.terminal__body {
  padding: 1.25rem 1.5rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.9;
}

.terminal__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.terminal__key {
  color: var(--text-faint);
}

.terminal__val {
  color: var(--text);
}

.terminal__val--ok {
  color: var(--accent);
}

.terminal__divider {
  margin: 0.625rem 0;
  border: 0;
  border-top: 1px dashed var(--line-strong);
}

/* ── Clients ── */
.clients {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 3.5rem;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.client {
  padding: 1.75rem 2rem;
  background: var(--bg-raised);
}

.client__name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
}

.client__desc {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Contact ── */
.section--contact {
  text-align: center;
  background:
    radial-gradient(ellipse 50% 60% at 50% 110%, rgba(62, 230, 196, 0.08), transparent 70%),
    var(--bg);
}

.section--contact .section__title,
.section--contact .section__lead {
  margin-left: auto;
  margin-right: auto;
}

.section--contact .section__tag {
  justify-content: center;
}

.section--contact .section__tag::before {
  display: none;
}

.contact__email {
  display: inline-block;
  margin-top: 2.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.25rem;
  transition: color 0.2s var(--ease);
}

.contact__email:hover,
.contact__email:focus-visible {
  color: var(--accent);
}

.contact__note {
  margin-top: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-faint);
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--line);
  background: #070a0d;
  padding: 4rem 1.5rem 2rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2.5rem;
  max-width: var(--max-w);
  margin: 0 auto 3rem;
}

.footer__brand {
  max-width: 22rem;
}

.footer__company {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
}

.footer__address {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.footer__email {
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

.footer__nav {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
}

.footer__nav a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}

.footer__nav a:hover,
.footer__nav a:focus-visible {
  color: var(--text);
}

.footer__copy {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  text-align: center;
}

/* ── Legal pages ── */
.legal-page {
  max-width: 42rem;
  margin: 0 auto;
  padding: calc(var(--header-h) + 4rem) 1.5rem 7rem;
}

.legal-page h1 {
  font-size: 2.25rem;
  letter-spacing: -0.03em;
  margin-bottom: 1.75rem;
}

.legal-page p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.legal-page a {
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.legal-back {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-faint);
}

.legal-back:hover {
  color: var(--accent);
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .product {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero__meta {
    gap: 2rem;
  }
}

@media (max-width: 680px) {
  .nav__links {
    gap: 1.25rem;
  }

  .nav__links li:not(:last-child) {
    display: none;
  }

  .services,
  .clients {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 4.5rem 1.25rem;
  }

  .hero {
    padding-bottom: 4rem;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .footer__inner {
    flex-direction: column;
    gap: 2rem;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
