/* ==========================================================
   TAIWAN MILHAS — Layout v2.0
   Cinematic Sections · Glass Header · Responsive Grid
   ========================================================== */

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.container-narrow {
  max-width: var(--max-w-narrow);
}

/* ── Header ── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);
  background: rgba(2, 11, 26, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 1000;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  transition: all var(--tr-normal);
}

.header.scrolled {
  background: rgba(2, 11, 26, 0.92);
  border-bottom-color: var(--border-medium);
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo img {
  height: 38px;
  width: auto;
  transition: transform var(--tr-normal);
}

.logo:hover img {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  transition: color var(--tr-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--grad-brand);
  border-radius: 1px;
  transition: width var(--tr-normal);
}

.nav-links a:hover {
  color: var(--text-white);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links .nav-cta {
  color: var(--bg-void);
  background: var(--grad-brand);
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--r-full);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-normal);
  text-transform: none;
  font-size: var(--fs-sm);
  transition: all var(--tr-normal);
  box-shadow: var(--glow-cyan);
}

.nav-links .nav-cta::after { display: none; }

.nav-links .nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--glow-cyan-strong);
  color: var(--bg-void);
}

/* ── Mobile Nav Toggle ── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-2);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  border-radius: 2px;
  transition: all var(--tr-normal);
}

/* ── Hero Section ── */
.hero {
  padding-top: calc(var(--header-h) + var(--sp-16));
  padding-bottom: var(--sp-20);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-void);
}

/* ── Hero Product — imagem horizontal em cima, texto abaixo ── */
.hero-product {
  padding-top: calc(var(--header-h) + var(--sp-8));
  padding-bottom: var(--sp-16);
  position: relative;
  overflow: hidden;
  background: var(--bg-void);
}

.hero-product-img {
  width: 100%;
  max-width: 900px;
  margin: 0 auto var(--sp-12);
  border-radius: var(--r-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-2xl), var(--glow-cyan);
  border: 1px solid var(--border-brand);
  aspect-ratio: 16 / 9;
  position: relative;
}

.hero-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform var(--tr-slow);
}

.hero-product-img:hover img {
  transform: scale(1.02);
}

.hero-product-body {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.hero-product-body h1 {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-extrabold);
  letter-spacing: var(--ls-tight);
  line-height: 1.1;
  margin-bottom: var(--sp-5);
}

.hero-product-body .hero-sub {
  font-size: var(--fs-md);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-8);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.hero-product-actions {
  display: flex;
  gap: var(--sp-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}

/* Ambient light for product hero */
.hero-product::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(0, 165, 196, 0.1) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.hero-product .container {
  position: relative;
  z-index: 1;
}

/* Responsive product hero */
@media (max-width: 768px) {
  .hero-product {
    padding-top: calc(var(--header-h) + var(--sp-6));
    padding-bottom: var(--sp-10);
  }
  .hero-product-img {
    border-radius: var(--r-lg);
    margin-bottom: var(--sp-8);
    aspect-ratio: 4 / 3;
  }
  .hero-product-body h1 { font-size: var(--fs-xl); }
  .hero-product-body .hero-sub { font-size: var(--fs-sm); }
  .hero-product-actions { flex-direction: column; align-items: center; }
  .hero-product-actions .btn { width: 100%; max-width: 360px; }
}

@media (max-width: 480px) {
  .hero-product-img { aspect-ratio: 3 / 2; }
  .hero-product-body h1 { font-size: var(--fs-lg); }
}

/* Ambient light effects */
.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -15%;
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(0, 165, 196, 0.12) 0%, transparent 65%);
  border-radius: 50%;
  z-index: 0;
  animation: pulseGlow 8s ease-in-out infinite alternate;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(6, 42, 120, 0.3) 0%, transparent 65%);
  border-radius: 50%;
  z-index: 0;
  animation: pulseGlow 10s ease-in-out 2s infinite alternate;
}

@keyframes pulseGlow {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.1); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
  align-items: stretch;
  position: relative;
  z-index: 1;
  min-height: 480px;
}

.hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-content h1 {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: var(--sp-6);
}

.hero-content .hero-accent {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content .hero-sub {
  font-size: var(--fs-md);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-8);
  max-width: 520px;
}

/* Image column — stretches to match content height */
.hero-image {
  position: relative;
  width: 100%;
  min-height: 380px;
  align-self: stretch;
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-2xl), var(--glow-cyan);
  border: 1px solid var(--border-brand);
  background: var(--bg-card);
  transition: box-shadow var(--tr-slow);
  clip-path: inset(0 round var(--r-2xl));
}

.hero-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  transition: transform var(--tr-slow);
  border-radius: var(--r-2xl);
}

.hero-image:hover {
  box-shadow: var(--shadow-2xl), var(--glow-cyan-strong);
}

.hero-image:hover img {
  transform: scale(1.04);
}

/* Decorative ring behind hero image */
.hero-image::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100%;
  height: 100%;
  border: 2px solid var(--border-brand);
  border-radius: var(--r-2xl);
  z-index: -1;
  opacity: 0.4;
}

/* ── Sections ── */
.section {
  padding: var(--sp-24) 0;
  position: relative;
}

.section-dark {
  background: var(--bg-deep);
}

.section-surface {
  background: var(--bg-surface);
}

.section-gradient {
  background: var(--grad-surface);
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--grad-brand);
  border-radius: 2px;
  margin: 0 auto var(--sp-8);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  margin-bottom: var(--sp-4);
}

.section-label::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.section-title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-extrabold);
  letter-spacing: var(--ls-tight);
  margin-bottom: var(--sp-4);
  color: var(--text-white);
}

.section-title.text-center { text-align: center; }

.section-desc {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  max-width: 640px;
}

.section-desc.text-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* ── Grid Layouts ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-8); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }

/* ── Footer ── */
.footer {
  background: var(--bg-deep);
  padding: var(--sp-12) 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-6);
}

.footer-copy {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: var(--sp-6);
}

.footer-links a {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  transition: color var(--tr-fast);
}

.footer-links a:hover {
  color: var(--cyan);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: unset;
    text-align: center;
  }
  .hero-content h1 { font-size: var(--fs-3xl); }
  .hero-content .hero-sub { max-width: 100%; margin-left: auto; margin-right: auto; }
  .hero-content { align-items: center; }

  /* On tablet/mobile, image is no longer absolute-fill — reset to normal flow */
  .hero-image {
    position: relative;
    align-self: auto;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    min-height: 300px;
    height: 300px;
  }
  .hero-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
  }
  .hero-image::before { display: none; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }

  .nav-links { display: none; }
  .nav-toggle { display: block; }

  /* Mobile menu */
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: 100%;
    background: var(--bg-glass-strong);
    backdrop-filter: blur(20px);
    padding: var(--sp-8) var(--sp-6);
    gap: var(--sp-6);
    border-bottom: 1px solid var(--border-medium);
    animation: slideDown 0.3s var(--ease-out);
    z-index: 999;
  }

  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + var(--sp-10));
    padding-bottom: var(--sp-10);
  }
  .hero-content h1 { font-size: var(--fs-2xl); }
  .hero-content .hero-sub { font-size: var(--fs-sm); margin-bottom: var(--sp-6); }
  .hero-image {
    height: 240px;
    min-height: 240px;
    max-width: 100%;
  }

  .section { padding: var(--sp-12) 0; }
  .section-title { font-size: var(--fs-xl); }

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

  .footer-inner { flex-direction: column; text-align: center; }
  .stat-row { justify-content: center; gap: var(--sp-6); }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: var(--fs-xl); }
  .container { padding: 0 var(--sp-4); }
  .hero-image { height: 200px; min-height: 200px; }
  .btn-lg { padding: var(--sp-4) var(--sp-6); font-size: var(--fs-base); }
  .flex.flex-wrap { flex-direction: column; }
  .flex.flex-wrap .btn { width: 100%; }
}
