/* =========================================================
   VARI Website — Direction A: Apple-clean minimal
   Aesthetic: Generous white space, precise typography,
   product photography hero, subtle micro-interactions
   ========================================================= */

:root {
  --vari-cyan: #00B5D8;
  --vari-cyan-deep: #0095B6;
  --vari-cyan-soft: #E6F8FB;
  --ink-900: #0A0E13;
  --ink-700: #2C3440;
  --ink-500: #6B7785;
  --ink-300: #C7CDD4;
  --ink-100: #F2F4F6;
  --paper: #FFFFFF;
  --off-white: #FAFAFA;
  --max-w: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --shadow-soft: 0 1px 2px rgba(10, 14, 19, 0.04), 0 8px 24px rgba(10, 14, 19, 0.06);
  --shadow-hover: 0 2px 4px rgba(10, 14, 19, 0.06), 0 16px 40px rgba(10, 14, 19, 0.08);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 200ms;
  --t-mid: 320ms;
  --t-slow: 600ms;
}

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

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

body {
  font-family: 'Inter', 'Noto Sans Lao', 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-900);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
}

[lang="lo"] body, [lang="lo"] {
  font-family: 'Noto Sans Lao', 'Inter', sans-serif;
  line-height: 1.7;
}
[lang="th"] body, [lang="th"] {
  font-family: 'Noto Sans Thai', 'Inter', sans-serif;
  line-height: 1.65;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:focus-visible {
  outline: 2px solid var(--vari-cyan);
  outline-offset: 4px;
  border-radius: 2px;
}
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ===== Layout ===== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(72px, 10vw, 140px) 0;
}
.section-tight { padding: clamp(48px, 7vw, 96px) 0; }

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-family: 'Inter', 'Noto Sans Lao', 'Noto Sans Thai', sans-serif;
  letter-spacing: -0.022em;
  font-weight: 600;
  color: var(--ink-900);
}
.display-1 {
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.display-2 {
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 600;
}
.h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.h3 {
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.25;
  font-weight: 600;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--vari-cyan-deep);
  margin-bottom: 16px;
}
.lead {
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.55;
  color: var(--ink-700);
  font-weight: 400;
}
.muted { color: var(--ink-500); }

/* ===== Navigation ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(10, 14, 19, 0.08);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo img { height: 26px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  font-size: 14px;
  font-weight: 400;
}
.nav-links a {
  color: var(--ink-700);
  transition: opacity var(--t-fast) var(--ease);
}
.nav-links a:hover { opacity: 0.65; }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--ink-300);
  border-radius: 999px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
}
.lang-switch button {
  padding: 6px 12px;
  color: var(--ink-700);
  transition: all var(--t-fast) var(--ease);
}
.lang-switch button.active {
  background: var(--ink-900);
  color: var(--paper);
}
@media (max-width: 768px) {
  .nav-links { display: none; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink-900);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--vari-cyan-deep);
  transform: translateY(-1px);
}
.btn-ghost {
  color: var(--ink-900);
  border: 1px solid var(--ink-300);
}
.btn-ghost:hover {
  border-color: var(--ink-900);
}
.btn-link {
  color: var(--vari-cyan-deep);
  font-weight: 500;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-link::after {
  content: '→';
  transition: transform var(--t-fast) var(--ease);
}
.btn-link:hover::after { transform: translateX(4px); }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: clamp(64px, 9vw, 120px) 0 clamp(72px, 10vw, 140px);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.hero-text { max-width: 560px; }
.hero-text h1 { margin-bottom: 24px; }
.hero-text .lead { margin-bottom: 36px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1.05;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg, var(--vari-cyan-soft), var(--paper));
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform var(--t-slow) var(--ease);
}
.hero-visual:hover img { transform: scale(1.03); }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { aspect-ratio: 4 / 5; max-height: 520px; }
}

/* ===== Trust strip ===== */
.trust {
  border-top: 1px solid rgba(10, 14, 19, 0.08);
  border-bottom: 1px solid rgba(10, 14, 19, 0.08);
  padding: 32px 0;
  background: var(--off-white);
}
.trust-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.trust-label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-500);
  font-weight: 500;
}
.trust-list {
  display: flex;
  gap: clamp(20px, 3vw, 48px);
  flex-wrap: wrap;
  list-style: none;
  font-size: 14px;
  color: var(--ink-700);
  font-weight: 500;
}

/* ===== Stats ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 48px);
  padding: clamp(56px, 8vw, 96px) 0;
  border-top: 1px solid rgba(10, 14, 19, 0.06);
}
.stat-num {
  font-size: clamp(36px, 4.5vw, 60px);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink-900);
  line-height: 1;
}
.stat-num span { color: var(--vari-cyan); }
.stat-label {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-500);
}
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Feature cards (Apple style) ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.feature-card {
  position: relative;
  background: var(--off-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: clamp(32px, 4vw, 56px);
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.feature-card-large {
  grid-column: span 2;
  min-height: 540px;
  background: linear-gradient(180deg, var(--vari-cyan-soft) 0%, var(--paper) 100%);
}
.feature-card-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.feature-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
}
.feature-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(10, 14, 19, 0.78) 100%);
  z-index: 1;
}
.feature-card-content {
  position: relative;
  z-index: 2;
  color: var(--paper);
}
.feature-card-content.dark { color: var(--ink-900); }
.feature-card-content h3 { font-size: clamp(24px, 2.2vw, 32px); margin-bottom: 12px; color: inherit; }
.feature-card-content p { font-size: 16px; opacity: 0.9; }
@media (max-width: 720px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card-large { grid-column: span 1; }
  .feature-card { min-height: 420px; }
}

/* ===== Product showcase ===== */
.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.product {
  background: var(--off-white);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--t-mid) var(--ease);
}
.product:hover {
  background: var(--paper);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.product img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  margin-bottom: 20px;
  transition: transform var(--t-mid) var(--ease);
}
.product:hover img { transform: scale(1.04); }
.product h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}
.product .product-spec {
  font-size: 13px;
  color: var(--ink-500);
}
@media (max-width: 880px) {
  .products { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Section heading ===== */
.section-head {
  max-width: 720px;
  margin: 0 auto clamp(40px, 5vw, 64px);
  text-align: center;
}
.section-head .h2 { margin-bottom: 16px; }

/* ===== Cert badges ===== */
.certs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 720px;
  margin: 40px auto 0;
}
.cert {
  text-align: center;
  padding: 32px 20px;
  border: 1px solid rgba(10, 14, 19, 0.08);
  border-radius: var(--radius-md);
  background: var(--paper);
  transition: border-color var(--t-fast) var(--ease);
}
.cert:hover { border-color: var(--vari-cyan); }
.cert-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--vari-cyan-soft);
  border-radius: 50%;
  color: var(--vari-cyan-deep);
  font-weight: 600;
  font-size: 13px;
}
.cert-name { font-weight: 600; font-size: 15px; }
.cert-desc { font-size: 13px; color: var(--ink-500); margin-top: 4px; }
@media (max-width: 600px) {
  .certs { grid-template-columns: 1fr; }
}

/* ===== Sustainability split ===== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
}
.split-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}
.split-image img {
  width: 100%; height: 100%; object-fit: cover;
}
.split-text { max-width: 480px; }
.split-text h2 { margin-bottom: 24px; }
.split-text p { font-size: 17px; color: var(--ink-700); margin-bottom: 16px; }
.split-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(10, 14, 19, 0.08);
}
.split-stat-num {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--vari-cyan-deep);
  line-height: 1;
}
.split-stat-label {
  font-size: 14px;
  color: var(--ink-500);
  margin-top: 6px;
}
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
}

/* ===== Partners ===== */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.partner-tile {
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--off-white);
  border-radius: var(--radius-md);
  padding: 20px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-700);
  text-align: center;
  letter-spacing: -0.01em;
  transition: all var(--t-fast) var(--ease);
}
.partner-tile:hover {
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  color: var(--ink-900);
}
@media (max-width: 880px) { .partners-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .partners-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== CTA Banner ===== */
.cta {
  background: var(--ink-900);
  color: var(--paper);
  border-radius: var(--radius-lg);
  padding: clamp(56px, 8vw, 96px) clamp(32px, 5vw, 80px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(0, 181, 216, 0.25), transparent 60%);
}
.cta > * { position: relative; z-index: 1; }
.cta h2 { color: var(--paper); margin-bottom: 16px; }
.cta p { color: rgba(255,255,255,0.75); font-size: 18px; margin-bottom: 32px; }
.cta .btn-primary {
  background: var(--paper);
  color: var(--ink-900);
}
.cta .btn-primary:hover {
  background: var(--vari-cyan);
  color: var(--paper);
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid rgba(10, 14, 19, 0.08);
  padding: 64px 0 32px;
  background: var(--off-white);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand img { height: 28px; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; color: var(--ink-500); max-width: 300px; }
.footer h5 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-900);
  margin-bottom: 16px;
}
.footer-list {
  list-style: none;
  display: grid;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-700);
}
.footer-list a:hover { color: var(--vari-cyan-deep); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(10, 14, 19, 0.08);
  font-size: 13px;
  color: var(--ink-500);
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
}

/* ===== Language toggle (CSS-only via [lang] attr on <html>) ===== */
[data-i18n-lo],
[data-i18n-th],
[data-i18n-en] { display: none; }
html[lang="lo"] [data-i18n-lo] { display: inline; }
html[lang="lo"] [data-i18n-lo].block { display: block; }
html[lang="th"] [data-i18n-th] { display: inline; }
html[lang="th"] [data-i18n-th].block { display: block; }
html[lang="en"] [data-i18n-en] { display: inline; }
html[lang="en"] [data-i18n-en].block { display: block; }

/* ===== Reveal on scroll (subtle) ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  }
  .reveal.in {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Sub-page hero ===== */
.subhero {
  padding: clamp(80px, 10vw, 140px) 0 clamp(48px, 6vw, 80px);
  background: linear-gradient(180deg, var(--vari-cyan-soft) 0%, var(--paper) 100%);
  text-align: center;
}
.subhero .container { max-width: 760px; }
.subhero h1 { margin-bottom: 16px; }
.subhero p { color: var(--ink-700); font-size: 18px; }

/* ===== Story ===== */
.timeline {
  display: grid;
  gap: 32px;
  max-width: 720px;
  margin: 0 auto;
}
.timeline-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(10, 14, 19, 0.08);
}
.timeline-year {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--vari-cyan-deep);
}
.timeline-body h4 { margin-bottom: 8px; font-size: 19px; }
.timeline-body p { color: var(--ink-700); font-size: 16px; }
@media (max-width: 600px) {
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
}

/* ===== Contact form ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
}
.contact-info { font-size: 16px; color: var(--ink-700); }
.contact-info dt { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-500); margin-top: 24px; margin-bottom: 4px; font-weight: 500; }
.contact-info dd { font-weight: 500; color: var(--ink-900); }
.form-row { display: grid; gap: 8px; margin-bottom: 20px; }
.form-row label { font-size: 14px; font-weight: 500; }
.form-row input,
.form-row textarea {
  border: 1px solid var(--ink-300);
  border-radius: 12px;
  padding: 14px 16px;
  font: inherit;
  background: var(--paper);
  transition: border-color var(--t-fast) var(--ease);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--vari-cyan);
}
.form-row textarea { resize: vertical; min-height: 120px; }
@media (max-width: 880px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ===== Logo images in Trust strip ===== */
.trust-list li {
  display: inline-flex;
  align-items: center;
  height: 36px;
}
.trust-list img {
  max-height: 32px;
  max-width: 100px;
  width: auto;
  height: auto;
  filter: grayscale(100%) opacity(0.6);
  transition: filter var(--t-fast) var(--ease);
  object-fit: contain;
}
.trust-list img:hover {
  filter: grayscale(0%) opacity(1);
}

/* ===== Logo images in Partners grid ===== */
.partner-tile img {
  max-width: 80%;
  max-height: 60px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(20%);
  transition: filter var(--t-fast) var(--ease);
}
.partner-tile:hover img {
  filter: grayscale(0%);
}
.partner-category-label {
  grid-column: 1 / -1;
  margin-top: 32px;
  margin-bottom: -8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-500);
  border-top: 1px solid rgba(10,14,19,0.06);
  padding-top: 24px;
}
.partner-category-label:first-child { margin-top: 0; border-top: none; padding-top: 0; }

/* ===== Social media links in footer ===== */
.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: var(--ink-300);
  transition: all var(--t-fast) var(--ease);
  text-decoration: none;
}
.footer-social a:hover {
  background: var(--vari-cyan);
  color: var(--paper);
  transform: translateY(-2px);
}
.footer-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ===== News page ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.news-card {
  background: var(--paper);
  border: 1px solid rgba(10,14,19,0.06);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--t-fast) var(--ease);
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: var(--vari-cyan-soft);
}
.news-card-image {
  aspect-ratio: 16/9;
  background: var(--vari-cyan-soft);
  background-size: cover;
  background-position: center;
}
.news-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.news-card-date {
  font-size: 12px;
  color: var(--ink-500);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 12px;
}
.news-card-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: var(--ink-900);
  margin: 0 0 12px 0;
}
.news-card-excerpt {
  font-size: 15px;
  color: var(--ink-700);
  line-height: 1.6;
  margin: 0 0 20px 0;
  flex: 1;
}
.news-card-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--vari-cyan);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.news-card-link:hover { color: var(--vari-cyan-deep); }

/* ===== Mobile tweaks for partners ===== */
@media (max-width: 880px) {
  .trust-list { gap: 16px; }
  .trust-list img { max-height: 24px; max-width: 70px; }
}
