/* ═══════════════════════════════════════════════════════
   TRIOTECH AUTOMATION — GLOBAL DESIGN SYSTEM
   ═══════════════════════════════════════════════════════ */

/* ─── IMPORTS ─── */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Mono:wght@300;400;500&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Josefin+Sans:wght@300;400;500;600;700&display=swap');

/* ─── CSS CUSTOM PROPERTIES ─── */
:root {
  --bg-primary: #ffffff;
  --bg-card: #f7f8fa;
  --bg-elevated: #f0f1f4;
  --bg-input: #f4f5f7;
  --accent: #e85d04;
  --accent-light: #f48c42;
  --accent-dark: #c44e03;
  --text-primary: #111318;
  --text-secondary: #555d6b;
  --text-muted: #9da3ae;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-accent: #e85d04;
  --glow-primary: rgba(232, 93, 4, 0.07);
  --glow-secondary: rgba(232, 93, 4, 0.03);
  --font-display: 'Bebas Neue', 'Impact', sans-serif;
  --font-body: 'Josefin Sans', 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', 'Consolas', monospace;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --grid-max: 1280px;
  --section-pad: clamp(80px, 10vw, 140px);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  position: relative;
}

img, video, model-viewer {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol { list-style: none; }
button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

/* ─── GRID OVERLAY ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* ─── AMBIENT GLOWS ─── */
body::after {
  content: '';
  position: fixed;
  top: -30%;
  right: -20%;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-primary) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.glow-bottom-left {
  position: fixed;
  bottom: -25%;
  left: -15%;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-secondary) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ─── LAYOUT ─── */
.container {
  width: 100%;
  max-width: var(--grid-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
  position: relative;
  z-index: 1;
}

section {
  position: relative;
  z-index: 1;
}

/* ─── TYPOGRAPHY ─── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

h1 { font-size: clamp(3rem, 7vw, 6rem); }
h2 { font-size: clamp(2.2rem, 4.5vw, 3.8rem); }
h3 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h4 { font-size: clamp(1.3rem, 2vw, 1.7rem); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.section-headline {
  margin-bottom: 24px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.8;
}

/* ─── BUTTONS (Pill-Shaped) ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.35s var(--ease-out-quart);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(232, 93, 4, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-arrow::after {
  content: '→';
  transition: transform 0.3s var(--ease-out-quart);
}

.btn-arrow:hover::after {
  transform: translateX(4px);
}

/* ─── CARDS ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: clamp(24px, 3vw, 40px);
  position: relative;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(232, 93, 4, 0.1);
}

/* Corner accents */
.card::before,
.card::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--accent);
  border-style: solid;
  opacity: 0.4;
  transition: opacity 0.35s ease;
}

.card::before {
  top: -1px;
  right: -1px;
  border-width: 2px 2px 0 0;
  border-radius: 0 var(--radius-md) 0 0;
}

.card::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 var(--radius-md) 0;
}

.card:hover::before,
.card:hover::after {
  opacity: 0.8;
}

.card-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.card-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ─── NAVIGATION (Pill-Shaped Floating) ─── */
.nav-wrapper {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - 48px);
  max-width: var(--grid-max);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  transition: transform 0.4s var(--ease-out-quart), background 0.3s ease, box-shadow 0.3s ease, top 0.3s ease;
}

.nav-wrapper.scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
  top: 12px;
}

.nav-wrapper.nav-hidden {
  transform: translateX(-50%) translateY(calc(-100% - 32px));
}

.nav-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 12px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.nav-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-logo-icon::before {
  content: 'T';
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--accent);
  position: absolute;
}

.nav-logo-icon:has(img)::before {
  display: none;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.12em;
  color: var(--text-primary);
}

.nav-logo-text span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: 999px;
  transition: color 0.3s ease, background 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

.nav-link.active {
  color: var(--accent);
  background: rgba(232, 93, 4, 0.08);
}

.nav-link::after {
  display: none;
}

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.35s var(--ease-out-quart);
}

.nav-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile overlay */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(30px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav .nav-link {
  font-size: 1.1rem;
  padding: 14px 24px;
}

/* ─── FORMS ─── */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239da3ae' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

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

.form-file-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  border: 2px dashed rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease;
  text-align: center;
}

.form-file-upload:hover {
  border-color: var(--accent);
  background: rgba(232, 93, 4, 0.03);
}

.form-file-upload input[type="file"] {
  display: none;
}

.form-file-label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.form-file-label strong {
  color: var(--accent);
}

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

/* ─── FORM STATUS MESSAGES ─── */
.form-status {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  margin-top: 16px;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #16a34a;
}

.form-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

.form-status.loading {
  display: block;
  background: rgba(232, 93, 4, 0.08);
  border: 1px solid rgba(232, 93, 4, 0.2);
  color: var(--accent);
}

/* ─── FOOTER ─── */
.site-footer {
  padding: 64px 0 24px;
  border-top: 1px solid var(--border-subtle);
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  max-width: 320px;
  line-height: 1.7;
  margin-top: 16px;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.footer-link {
  display: block;
  font-size: 0.92rem;
  color: var(--text-secondary);
  padding: 5px 0;
  transition: color 0.25s ease;
}

.footer-link:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* ─── MODEL VIEWER ─── */
model-viewer {
  width: 100%;
  height: 100%;
  background: transparent;
  --poster-color: transparent;
}

model-viewer::part(default-progress-bar) {
  background-color: var(--accent);
  height: 3px;
}

.model-viewer-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  position: relative;
}

.model-viewer-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 70%, var(--glow-secondary) 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, var(--glow-secondary) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ─── FULLPAGE SECTIONS ─── */
.fp-section {
  min-height: 100vh;
  min-height: 100dvh;
}

/* ─── DIVIDERS ─── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.08), var(--accent), rgba(0,0,0,0.08), transparent);
  margin: 0;
}

/* ─── STATS ─── */
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--accent);
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ─── SCROLL REVEAL ANIMATIONS ─── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── TAGS / BADGES ─── */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid rgba(232, 93, 4, 0.3);
  border-radius: 2px;
  color: var(--accent);
  background: rgba(232, 93, 4, 0.06);
}

/* ─── PAGE HEADER (shared across inner pages) ─── */
.page-header {
  padding: clamp(140px, 18vw, 200px) 0 clamp(48px, 6vw, 80px);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 0%, var(--glow-primary) 0%, transparent 60%);
  pointer-events: none;
}

/* ─── SPINNER ─── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── WHATSAPP FLOATING BUTTON ─── */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 998;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35), 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.3s var(--ease-out-quart), box-shadow 0.3s ease;
  cursor: pointer;
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.45), 0 4px 12px rgba(0,0,0,0.15);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
  .whatsapp-float svg {
    width: 24px;
    height: 24px;
  }
}

/* ─── LOGO MARQUEE (Infinite Scroll Strip) ─── */
.logo-marquee {
  overflow: hidden;
  padding: 28px 0;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.logo-marquee::before,
.logo-marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.logo-marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-primary), transparent);
}

.logo-marquee::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg-primary), transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 48px;
  width: max-content;
  animation: marquee-scroll 25s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-track img {
  height: 36px;
  width: auto;
  opacity: 1;
  filter: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
}

.marquee-track img:hover {
  opacity: 1;
  transform: scale(1.05);
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
  .marquee-track {
    gap: 32px;
  }
  .marquee-track img {
    height: 28px;
  }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

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

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 10px 22px;
    font-size: 0.72rem;
  }
}