/* ThaniX Tech — design tokens and base styles.
   Palette: dark navy, white, and blue. Edit the tokens below to re-theme the site. */

:root {
  --navy-900: #0a1a33;
  --navy-800: #112647;
  --blue-300: #93c5fd;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --surface: #f8fafc;
  --white: #ffffff;
  --radius: 12px;
  --max-width: 1120px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--blue-700);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--white);
  padding: 8px 12px;
  border-radius: 6px;
}

.skip-link:focus {
  left: 8px;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  font-weight: 750;
}

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 700;
}

h3 {
  font-size: 1.15rem;
  font-weight: 650;
}

p {
  margin: 0 0 1em;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 0.75rem;
}

.lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 60ch;
}

/* ---------- Header and navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
}

.logo {
  height: 40px;
  width: auto;
}

.logo-plate {
  background: var(--white);
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  height: auto;
  width: 160px;
  max-width: 100%;
}

.site-header .container {
  position: relative;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--blue-600);
  color: var(--white);
  font-weight: 800;
}

.word-accent {
  color: var(--blue-300);
}

.nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  background: var(--white);
  border-top: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.nav.open {
  display: flex;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  padding: 0.75rem 0.5rem;
  border-radius: 8px;
}

.nav a[aria-current='page'] {
  color: var(--blue-700);
  background: var(--surface);
}

.nav a.nav-cta {
  background: var(--blue-600);
  color: var(--white);
  text-align: center;
}

.nav a.nav-cta:hover {
  background: var(--blue-700);
}

.nav-toggle {
  position: relative;
  width: 48px;
  height: 48px;
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 2px;
  margin: -1px 0 0 -11px;
  background: currentColor;
  transition: background-color 0.2s;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease), top 0.2s var(--ease);
}

.nav-toggle span::before {
  top: -7px;
}

.nav-toggle span::after {
  top: 7px;
}

.site-header.open .nav-toggle span {
  background: transparent;
}

.site-header.open .nav-toggle span::before {
  top: 0;
  transform: rotate(45deg);
}

.site-header.open .nav-toggle span::after {
  top: 0;
  transform: rotate(-45deg);
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .nav {
    display: flex;
    position: static;
    flex-direction: row;
    gap: 0.25rem;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .nav a {
    padding: 0.5rem 0.9rem;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s, transform 0.2s var(--ease);
}

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

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--blue-600);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--blue-700);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
}

.btn-ghost:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.btn-outline {
  border-color: var(--navy-900);
  color: var(--navy-900);
  background: transparent;
}

.btn-outline:hover {
  background: var(--navy-900);
  color: var(--white);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Sections ---------- */

.hero,
.page-hero {
  background: var(--navy-900);
  color: var(--white);
}

.hero {
  padding: clamp(4rem, 10vw, 7.5rem) 0;
}

.page-hero {
  padding: clamp(3rem, 8vw, 5rem) 0;
}

.hero .eyebrow,
.page-hero .eyebrow {
  color: var(--blue-300);
}

.hero .lead,
.page-hero .lead {
  color: #cbd5e1;
}

.section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.section-head p {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 1.25rem;
}

.grid-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.card p {
  color: var(--muted);
}

.card a {
  font-weight: 600;
  text-decoration: none;
}

.badge {
  display: inline-block;
  margin: 0.25rem 0 0.75rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
}

.badge-dev {
  background: #dbeafe;
  color: #1e3a8a;
}

.badge-live {
  background: #dcfce7;
  color: #14532d;
}

.cta-band {
  text-align: left;
}

.cta-band p {
  color: var(--muted);
  max-width: 60ch;
}

/* ---------- Products ---------- */

.product-list {
  display: grid;
  gap: 1.5rem;
}

.product {
  display: grid;
  gap: 1.75rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
}

@media (min-width: 860px) {
  .product {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }
}

.product .lead {
  font-size: 1.05rem;
}

.product-features {
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-features li {
  position: relative;
  padding: 0.6rem 0 0.6rem 1.75rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.product-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 10px;
  height: 10px;
  border: 2px solid var(--blue-600);
  border-radius: 50%;
}

.notice {
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-left: 3px solid var(--blue-600);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Contact form ---------- */

.contact-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }
}

.contact-email {
  font-size: 1.25rem;
  font-weight: 650;
}

.form {
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input[aria-invalid='true'],
.field textarea[aria-invalid='true'] {
  border-color: #b91c1c;
}

.error {
  min-height: 0;
  margin-top: 0.35rem;
  color: #b91c1c;
  font-size: 0.875rem;
}

.error:empty {
  display: none;
}

.form-status {
  display: none;
  padding: 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
}

.form-status.show {
  display: block;
}

.form-status.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.form-status.error-box {
  background: #fef2f2;
  color: #7f1d1d;
  border: 1px solid #fecaca;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Legal pages ---------- */

.legal {
  max-width: 760px;
}

.legal h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}

.legal ul {
  padding-left: 1.25rem;
  color: var(--muted);
}

.draft-banner {
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  color: #1e3a8a;
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 3rem 0 2rem;
  background: var(--navy-900);
  color: #cbd5e1;
}

.site-footer a {
  color: #e2e8f0;
}

.footer-inner {
  display: grid;
  gap: 2rem;
}

.footer-tagline {
  margin: 0.75rem 0 0.5rem;
  color: #94a3b8;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-content: start;
}

.footer-nav a {
  text-decoration: none;
}

.footer-nav a:hover,
.site-footer a:hover {
  text-decoration: underline;
}

.copyright {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: #94a3b8;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 2fr 1fr;
  }
}

/* ---------- Motion ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

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

/* ---------- Home page: vision and contact lines ---------- */

.vision {
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  color: var(--ink);
  max-width: 48ch;
  margin-bottom: 0;
}

.contact-lines {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--ink);
  font-weight: 500;
}

.contact-lines a {
  font-weight: 600;
}

/* ---------- Home hero (concept layout, original artwork) ---------- */

.hero-home {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 9vw, 6.5rem) 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2rem;
}

.hero-logo {
  width: 200px;
  height: auto;
  padding: 0.6rem 0.8rem;
  background: var(--white);
  border-radius: 12px;
  margin-bottom: 1.75rem;
}

.hero-tagline {
  color: #cbd5e1;
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.hero-home h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  max-width: 14ch;
}

.hero-home .accent-line {
  color: #38bdf8;
}

.hero-home .lead {
  color: #cbd5e1;
  max-width: 46ch;
}

.btn-arrow {
  padding-inline: 1.75rem;
}

.btn-arrow span {
  margin-left: 0.5rem;
}

.hero-art {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: -12%;
  width: min(560px, 80vw);
  transform: translateY(-50%);
  pointer-events: none;
}

.hero-art .globe {
  fill: rgba(37, 99, 235, 0.08);
  stroke: rgba(56, 189, 248, 0.55);
  stroke-width: 1.5;
}

.hero-art .globe-line {
  fill: none;
  stroke: rgba(56, 189, 248, 0.25);
  stroke-width: 1;
}

.hero-art .net-lines line {
  stroke: rgba(56, 189, 248, 0.45);
  stroke-width: 1.2;
}

.hero-art .net-nodes circle {
  fill: #7dd3fc;
  filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.9));
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}

@media (max-width: 899px) {
  .hero-art {
    width: 130vw;
    top: auto;
    bottom: -18%;
    right: -40%;
    transform: none;
    opacity: 0.35;
  }
}

/* ---------- Home hero: background photo with legibility overlay ---------- */

.hero-home {
  background: var(--navy-900) url('/hero-bg.jpg') center / cover no-repeat;
}

.hero-home::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    90deg,
    rgba(10, 26, 51, 0.94) 0%,
    rgba(10, 26, 51, 0.78) 50%,
    rgba(10, 26, 51, 0.5) 100%
  );
}

@media (max-width: 899px) {
  .hero-home::before {
    background: rgba(10, 26, 51, 0.82);
  }
}
