:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-thai: 'Noto Sans Thai', var(--font-sans);
  
  --bg-base: #ffffff;
  --bg-surface: #f9fafb;
  --bg-surface-subtle: #f3f4f6;
  
  --fg-base: #111827;
  --fg-muted: #4b5563;
  --fg-faint: #9ca3af;
  
  --border-color: #e5e7eb;
  --accent-color: #1e3a8a;
  
  --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s ease;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

body {
  background-color: var(--bg-base);
  color: var(--fg-base);
  font-family: var(--font-thai);
  line-height: 1.5;
  overflow-x: hidden;
}

body.antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul {
  list-style: none;
}

/* Utilities */
.container {
  width: 100%;
  max-width: 80rem; /* 1280px */
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }
}

.relative { position: relative; }
.pb-16 { padding-bottom: 4rem; }
.pt-32 { padding-top: 8rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.pb-8 { padding-bottom: 2rem; }
.pt-16 { padding-top: 4rem; }
.pt-6 { padding-top: 1.5rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-6 { margin-top: 1.5rem; }
.ml-auto { margin-left: auto; }

@media (min-width: 768px) {
  .md-py-24 { padding-top: 6rem; padding-bottom: 6rem; }
  .md-pt-20 { padding-top: 5rem; }
}

.row {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .row {
    flex-direction: row;
    align-items: flex-start;
    gap: 4rem;
  }
  .row-reverse {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    gap: 4rem;
  }
}

.border-t { border-top: 1px solid var(--border-color); }
.border { border: 1px solid var(--border-color); }

.text-fg { color: var(--fg-base); }
.text-fg-muted { color: var(--fg-muted); }
.text-fg-faint { color: var(--fg-faint); }
.text-accent { color: var(--accent-color); }
.text-right { text-align: left; }
@media (min-width: 768px) {
  .text-right { text-align: right; }
}

.justify-end { justify-content: flex-start; }
@media (min-width: 768px) {
  .justify-end { justify-content: flex-end; }
}

.inline-block { display: inline-block; }

/* Language Toggle */
.lang-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 50;
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: border-color var(--transition-normal);
}
.lang-toggle:hover {
  border-color: var(--fg-faint);
}
.lang-toggle span {
  padding: 0.375rem 0.625rem;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  letter-spacing: 0.05em;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}
.lang-active {
  background-color: var(--bg-surface-subtle);
  color: var(--fg-base);
}
.lang-inactive {
  color: var(--fg-faint);
}


/* Animations */
@keyframes scaleYIn {
  0% { transform: scaleY(0); }
  100% { transform: scaleY(1); }
}
@keyframes scaleXIn {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}
@keyframes slideUp {
  0% { transform: translateY(110%); }
  100% { transform: translateY(0); }
}
@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Initial hidden states for scroll animation */
.animate-on-load,
.animate-on-scroll,
.animate-on-scroll-left,
.animate-on-scroll-right {
  opacity: 0;
}

.animate-on-load {
  transform: translateX(-40px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.animate-on-scroll {
  transform: translateY(20px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.animate-on-scroll-left {
  transform: translateX(-40px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.animate-on-scroll-right {
  transform: translateX(40px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.is-visible {
  opacity: 1 !important;
  transform: translate(0, 0) !important;
}

/* Hero Section */
.hero-section {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.025em;
  font-family: var(--font-sans);
  background: linear-gradient(135deg, #111827 0%, #1e3a8a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  margin-top: 1.5rem;
  max-width: 42rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--fg-muted);
}
.hero-est {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--fg-faint);
}

/* Section Header */
.section-header {
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
@media (min-width: 768px) {
  .section-header {
    margin-bottom: 3rem;
  }
}
.icon-lg {
  height: 4rem;
  width: 4rem;
}
.section-title {
  position: relative;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
}
.title-underline {
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 100%;
  height: 8px;
}
.title-underline path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s, opacity 1s ease;
  opacity: 0;
}
.is-visible .title-underline path {
  stroke-dashoffset: 0;
  opacity: 1;
}

/* Product List */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.product-item {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-color);
}
.product-item:first-child {
  padding-top: 0;
}
.product-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.product-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .product-content {
    flex-direction: row;
    gap: 4rem;
  }
  .product-item:nth-child(even) .product-content {
    flex-direction: row-reverse;
  }
}
.product-image-wrap {
  flex-shrink: 0;
}
.product-image-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 10rem;
  height: 10rem;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface-subtle);
  border-radius: 12px;
  overflow: hidden;
}
@media (min-width: 768px) {
  .product-image-box {
    width: 13rem;
    height: 13rem;
  }
}
.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.product-item:hover .product-img {
  transform: scale(1.05);
}
.product-details {
  flex: 1;
}
.product-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.product-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  transition: color var(--transition-normal);
}
@media (min-width: 768px) {
  .product-name { font-size: 1.5rem; }
}
.product-item:hover .product-name {
  color: var(--accent-color);
}
.product-status {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.status-dot {
  display: inline-block;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background-color: var(--accent-color);
}
.status-text {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  letter-spacing: 0.05em;
  color: var(--fg-faint);
}
.product-year {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-sans);
  font-size: 0.625rem;
  letter-spacing: 0.05em;
  color: var(--fg-faint);
}
.divider-short {
  margin-top: 0.75rem;
  height: 1px;
  width: 2.5rem;
  background-color: var(--border-color);
}
.product-desc {
  margin-top: 0.75rem;
  max-width: 32rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--fg-muted);
}
.product-tech {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--fg-faint);
}
.product-actions {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.75rem;
}

/* Buttons */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background-color: transparent;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg-muted);
  transition: all var(--transition-normal);
}
.btn-outline:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* Team */
.team-list {
  display: flex;
  flex-direction: column;
}
.team-member {
  padding: 3rem 0;
}
@media (min-width: 768px) {
  .team-member { padding: 4rem 0; }
}
.team-image-wrap {
  flex-shrink: 0;
}
.team-image-box {
  width: 10rem;
  height: 10rem;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  border-radius: 12px;
  overflow: hidden;
}
@media (min-width: 768px) {
  .team-image-box {
    width: 13rem;
    height: 13rem;
  }
}
.team-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.team-member:hover .team-img {
  transform: scale(1.05);
}
.team-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: 1.5rem;
}
@media (min-width: 768px) {
  .team-details { margin-top: 0; }
}
.team-username {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--fg-faint);
}
.team-name {
  margin-top: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}
@media (min-width: 768px) {
  .team-name { font-size: 1.875rem; }
}
.team-en-name {
  margin-top: 0.25rem;
  font-size: 1rem;
  color: var(--fg-faint);
}
.team-divider {
  margin-top: 1rem;
  width: 3rem;
}
.team-role {
  margin-top: 1rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  color: var(--fg-muted);
}
.team-desc {
  margin-top: 0.75rem;
  max-width: 28rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--fg-faint);
}
.team-social {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--fg-faint);
  transition: color var(--transition-normal);
  font-family: var(--font-sans);
  font-size: 0.75rem;
}
.social-link:hover {
  color: var(--fg-base);
}

/* Partner Box */
.partner-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 1.5rem;
  text-align: center;
}
@media (min-width: 768px) {
  .partner-box { padding: 5rem 1.5rem; }
}
.partner-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.partner-desc {
  margin-top: 0.5rem;
  max-width: 24rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--fg-muted);
}

/* Footer */
.footer-brand {
  flex: 1;
}
.footer-logo {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.025em;
}
.footer-slogan {
  margin-top: 0.75rem;
  max-width: 20rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--fg-muted);
}
.footer-links {
  gap: 4rem;
}
.link-group-title {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--fg-faint);
}
.link-group ul {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.link-group a {
  font-size: 0.875rem;
  color: var(--fg-muted);
  transition: color var(--transition-normal);
}
.link-group a:hover {
  color: var(--fg-base);
}

.footer-banner {
  overflow: hidden;
}
.banner-img-wrap {
  position: relative;
  width: 100%;
  height: 13rem;
}
@media (min-width: 768px) {
  .banner-img-wrap { height: 16rem; }
}
.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.05;
}
.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-base), transparent, rgba(255,255,255,0.6));
  pointer-events: none;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.copyright, .back-to-top {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  color: var(--fg-faint);
}
.back-to-top {
  transition: color var(--transition-normal);
}
.back-to-top:hover {
  color: var(--fg-base);
}

/* About Section / Timeline */
.about-lead {
  font-size: 1.125rem;
  color: var(--fg-muted);
  margin-bottom: 2.5rem;
  border-left: 2px solid var(--accent-color);
  padding-left: 1rem;
  line-height: 1.6;
}
.timeline {
  display: flex;
  flex-direction: column;
}
@media (min-width: 768px) {
  .timeline {
    flex-direction: row;
  }
}
.timeline-item {
  flex: 1;
}
.timeline-badge {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--fg-faint);
}
.timeline-title {
  margin-top: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg-base);
}
.timeline-desc {
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--fg-muted);
}

/* Meteor Shower */
.meteor-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background: transparent;
}
