/* Trastera Systems — Marketing Site */
:root {
  --blue: #1A4BB5;
  --blue-dark: #0F2E70;
  --blue-light: #3A6FD4;
  --red: #D42030;
  --red-dark: #A01824;
  --ink: #0B1220;
  --muted: #5A6577;
  --line: #E4E9F2;
  --bg: #FFFFFF;
  --bg-soft: #F5F7FB;
  --bg-deep: #0A1628;
  --radius: 16px;
  --shadow: 0 12px 40px rgba(15, 46, 112, 0.12);
  --font: "Inter", "Noto Sans Thai", system-ui, -apple-system, sans-serif;
  --max: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
ul { list-style: none; }

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 50%;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1rem; color: var(--blue); }
.brand-text span { font-size: 0.72rem; color: var(--muted); font-weight: 500; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  transition: background .2s, color .2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--blue);
  background: rgba(26, 75, 181, 0.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg);
}

.lang-toggle button {
  border: 0;
  background: transparent;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
}

.lang-toggle button.active {
  background: var(--blue);
  color: white;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  border: 0;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: white;
  box-shadow: 0 8px 24px rgba(26, 75, 181, 0.28);
}

.btn-primary:hover { box-shadow: 0 12px 28px rgba(26, 75, 181, 0.36); }

.btn-ghost {
  background: transparent;
  color: var(--blue);
  border: 1px solid rgba(26, 75, 181, 0.25);
}

.btn-red {
  background: linear-gradient(135deg, var(--red), #E84A56);
  color: white;
  box-shadow: 0 8px 24px rgba(212, 32, 48, 0.25);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  min-height: clamp(560px, 88vh, 820px);
  overflow: hidden;
  background: radial-gradient(ellipse at 70% 40%, #132A5C 0%, var(--bg-deep) 55%, #050B14 100%);
  color: white;
}

.hero-canvas,
.hero-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-fallback {
  display: none;
  background:
    radial-gradient(circle at 65% 45%, rgba(26,75,181,0.55), transparent 45%),
    radial-gradient(circle at 30% 70%, rgba(212,32,48,0.25), transparent 40%),
    linear-gradient(160deg, #0A1628, #132A5C);
}

.hero-fallback.show { display: block; }
.hero.no-webgl .hero-canvas { display: none; }

.hero-fallback-visual {
  position: absolute;
  right: 8%;
  top: 50%;
  transform: translateY(-50%);
  width: min(380px, 42vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    conic-gradient(from 210deg, rgba(26,75,181,0.0), rgba(58,111,212,0.45), rgba(212,32,48,0.35), transparent 70%),
    radial-gradient(circle, rgba(255,255,255,0.12), transparent 60%);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 0 80px rgba(26,75,181,0.35);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translateY(-50%) scale(1); opacity: 0.9; }
  50% { transform: translateY(-50%) scale(1.04); opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: 5.5rem 0 4rem;
  max-width: 620px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: #B8C7E8;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
}

.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #7EB0FF, #FFFFFF 45%, #FF8A94);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  color: #C5D0E6;
  font-size: 1.08rem;
  max-width: 34rem;
  margin-bottom: 1.75rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2.5rem; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 420px;
}

.hero-stats div {
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
}

.hero-stats strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 0.15rem;
}

.hero-stats span { font-size: 0.78rem; color: #A9B7D4; }

.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255,255,255,0.55);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Sections */
.section { padding: 5rem 0; }
.section.alt { background: var(--bg-soft); }
.section-head {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.section-head .label {
  color: var(--blue);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.section-head p { color: var(--muted); font-size: 1.05rem; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 4px 18px rgba(15, 46, 112, 0.04);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(26, 75, 181, 0.25);
}

.card .icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(26,75,181,0.12), rgba(212,32,48,0.08));
  color: var(--blue);
  font-size: 1.35rem;
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.card p { color: var(--muted); font-size: 0.95rem; }

.card a.more {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--blue);
  font-weight: 600;
  font-size: 0.92rem;
}

/* Category tiles */
.cat-tile {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: var(--radius);
  padding: 1.5rem;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid transparent;
}

.cat-tile.vision {
  background:
    linear-gradient(160deg, rgba(10,22,40,0.15), rgba(10,22,40,0.82)),
    linear-gradient(135deg, #1A4BB5, #0F2E70);
}

.cat-tile.security {
  background:
    linear-gradient(160deg, rgba(10,22,40,0.15), rgba(10,22,40,0.82)),
    linear-gradient(135deg, #D42030, #7A1220);
}

.cat-tile h3 { font-size: 1.35rem; margin-bottom: 0.4rem; }
.cat-tile p { color: rgba(255,255,255,0.82); font-size: 0.95rem; margin-bottom: 1rem; }
.cat-tile .btn { align-self: flex-start; background: white; color: var(--ink); }

/* Applications */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.pill {
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line);
  font-weight: 560;
  font-size: 0.92rem;
  color: var(--ink);
}

.pill span { color: var(--blue); margin-right: 0.35rem; }

/* Page hero (inner) */
.page-hero {
  padding: 4rem 0 3rem;
  background:
    radial-gradient(circle at 90% 10%, rgba(26,75,181,0.12), transparent 35%),
    radial-gradient(circle at 10% 80%, rgba(212,32,48,0.08), transparent 30%),
    var(--bg-soft);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.page-hero p {
  color: var(--muted);
  max-width: 640px;
  font-size: 1.05rem;
}

.breadcrumb {
  display: flex;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.breadcrumb a { color: var(--blue); }

/* Feature list */
.feature-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.feature-row.reverse { grid-template-columns: 0.9fr 1.1fr; }
.feature-row.reverse .feature-copy { order: 2; }

.feature-visual {
  border-radius: var(--radius);
  min-height: 280px;
  background:
    linear-gradient(145deg, rgba(26,75,181,0.12), rgba(212,32,48,0.08)),
    white;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.feature-visual::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26,75,181,0.18), transparent 70%);
}

.feature-visual .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  color: var(--blue-dark);
  text-align: center;
  line-height: 1.8;
  position: relative;
  z-index: 1;
}

.check-list { display: grid; gap: 0.75rem; margin-top: 1.25rem; }
.check-list li {
  display: flex;
  gap: 0.7rem;
  color: var(--muted);
}
.check-list li::before {
  content: "✓";
  color: white;
  background: var(--blue);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.about-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.about-card h3 { margin-bottom: 0.75rem; }
.about-card dl { display: grid; gap: 0.85rem; }
.about-card dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; }
.about-card dd { font-weight: 560; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.5rem;
}

.contact-info {
  background: var(--bg-deep);
  color: white;
  border-radius: var(--radius);
  padding: 1.75rem;
}

.contact-info h2 { margin-bottom: 0.75rem; }
.contact-info p { color: #B8C7E8; margin-bottom: 1.5rem; }
.contact-info .item { margin-bottom: 1.1rem; }
.contact-info .item strong { display: block; margin-bottom: 0.25rem; }
.contact-info .item span, .contact-info .item a { color: #C5D0E6; }

.form {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: grid;
  gap: 1rem;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

label { display: grid; gap: 0.4rem; font-weight: 600; font-size: 0.9rem; }
label span { color: var(--muted); font-weight: 500; font-size: 0.8rem; }

input, textarea, select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  background: var(--bg-soft);
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,75,181,0.15);
  background: white;
}

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

.form-note {
  font-size: 0.82rem;
  color: var(--muted);
}

/* CTA band */
.cta-band {
  margin: 0 0 5rem;
  border-radius: calc(var(--radius) + 4px);
  padding: 2.5rem;
  background:
    linear-gradient(120deg, rgba(26,75,181,0.95), rgba(15,46,112,0.98) 55%, rgba(122,18,32,0.92));
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cta-band h2 { font-size: 1.6rem; letter-spacing: -0.02em; margin-bottom: 0.4rem; }
.cta-band p { color: rgba(255,255,255,0.8); max-width: 420px; }
.cta-band .btn { background: white; color: var(--blue-dark); }

/* Footer */
.site-footer {
  background: #070E18;
  color: #A9B7D4;
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.footer-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
  background: white;
}

.footer-brand strong { display: block; color: white; margin-bottom: 0.35rem; }
.footer-brand p { font-size: 0.9rem; }

.footer-col h4 {
  color: white;
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
}

.footer-col a {
  display: block;
  padding: 0.25rem 0;
  color: #A9B7D4;
  font-size: 0.9rem;
}

.footer-col a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

/* Responsive */
@media (max-width: 900px) {
  .menu-toggle { display: grid; place-items: center; }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.85rem 1rem; }
  .grid-3, .grid-2, .feature-row, .feature-row.reverse,
  .about-grid, .contact-grid, .footer-grid, .form-row {
    grid-template-columns: 1fr;
  }
  .feature-row.reverse .feature-copy { order: 0; }
  .hero-content { max-width: 100%; padding-top: 4rem; }
  .hero-stats { max-width: 100%; }
}

@media (max-width: 560px) {
  .brand-text span { display: none; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { grid-template-columns: 1fr; }
}
