/* ============================================================
   ALPINE DIGITAL TECHNOLOGIES — Global Stylesheet
   Brand: Dark bg (#0d0d0d), White text, Green (#6aaa3b) accent
   ============================================================ */

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

:root {
  --bg:          #0d0d0d;
  --bg-2:        #141414;
  --bg-3:        #1a1a1a;
  --bg-4:        #222222;
  --green:       #6aaa3b;
  --green-dark:  #4e8a28;
  --green-light: #8ac855;
  --white:       #ffffff;
  --grey-1:      #f0f0f0;
  --grey-2:      #bbbbbb;
  --grey-3:      #777777;
  --grey-4:      #333333;
  --border:      rgba(255,255,255,0.08);
  --border-green: rgba(106,170,59,0.3);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter', sans-serif;

  --nav-h: 72px;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-green: 0 0 30px rgba(106,170,59,0.15);

  --transition: 0.25s ease;
  --max-w: 1200px;
}

html { scroll-behavior: smooth; font-size: 16px; }

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.display-xl { font-size: clamp(2.4rem, 6vw, 4.5rem); }
.display-lg { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.display-md { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.display-sm { font-size: clamp(1.2rem, 2vw, 1.5rem); }

.text-green  { color: var(--green); }
.text-grey   { color: var(--grey-2); }
.text-muted  { color: var(--grey-3); }

.eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
}

/* ── Layout Utilities ─────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 100px 0; }
.section-sm { padding: 64px 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: 12px; }
.gap-md { gap: 24px; }
.gap-lg { gap: 40px; }

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

/* ── Dividers & Accents ───────────────────────────────────── */
.green-line {
  width: 48px;
  height: 3px;
  background: var(--green);
  border-radius: 2px;
  margin: 16px 0 24px;
}

.green-line-center {
  width: 48px;
  height: 3px;
  background: var(--green);
  border-radius: 2px;
  margin: 16px auto 24px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--green);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(106,170,59,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--green);
  color: var(--green);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--green);
  padding: 0;
  font-weight: 600;
}
.btn-ghost:hover { opacity: 0.8; }
.btn-ghost .arrow { transition: transform var(--transition); }
.btn-ghost:hover .arrow { transform: translateX(4px); }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition);
}
.card:hover {
  border-color: var(--border-green);
  transform: translateY(-3px);
  box-shadow: var(--shadow-green);
}

.card-icon {
  width: 52px;
  height: 52px;
  background: rgba(106,170,59,0.12);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--green);
  font-size: 1.4rem;
}

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background var(--transition), border-bottom var(--transition);
}

.nav.scrolled {
  background: rgba(13,13,13,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo img {
  height: 36px;
  width: auto;
}
.nav-logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--white);
}

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

.nav-links a {
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--grey-2);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,0.06);
}

.nav-cta {
  background: var(--green) !important;
  color: var(--white) !important;
  padding: 8px 18px !important;
}
.nav-cta:hover {
  background: var(--green-dark) !important;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: rgba(13,13,13,0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px 28px;
  z-index: 999;
}
.nav-mobile.open { display: block; }
.nav-mobile a {
  display: block;
  padding: 12px 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--grey-2);
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--green); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('images/project-mahanakhon.webp');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(13,13,13,0.92) 45%, rgba(13,13,13,0.60) 100%),
    linear-gradient(to top, rgba(13,13,13,0.8) 0%, transparent 40%),
    radial-gradient(ellipse 60% 50% at 70% 40%, rgba(106,170,59,0.07) 0%, transparent 70%);
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero-content h1 { margin-bottom: 24px; }

.hero-content .lead {
  font-size: 1.15rem;
  color: var(--grey-2);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 40px;
}

.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.hero-stat-val {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.8rem;
  color: var(--grey-3);
  margin-top: 6px;
}

/* ── Pillar Teaser Cards (homepage) ───────────────────────── */
.pillar-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

/* ── Section Headers ──────────────────────────────────────── */
.section-header { margin-bottom: 56px; }
.section-header p {
  font-size: 1.05rem;
  color: var(--grey-2);
  max-width: 540px;
  margin-top: 16px;
}
.section-header.center { text-align: center; }
.section-header.center p { margin: 16px auto 0; }

/* ── Process Steps ────────────────────────────────────────── */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.process-step {
  background: var(--bg-2);
  padding: 36px 28px;
  transition: background var(--transition);
}
.process-step:hover { background: var(--bg-3); }

.step-num {
  font-size: 2.4rem;
  font-weight: 800;
  color: rgba(106,170,59,0.2);
  line-height: 1;
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}

.process-step h3 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--white);
}

.process-step p {
  font-size: 0.875rem;
  color: var(--grey-3);
  line-height: 1.6;
}

/* ── Stats Band ───────────────────────────────────────────── */
.stats-band {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 60px 0;
}

.stats-band .grid-4 { text-align: center; }

.stat-val {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--grey-3);
  line-height: 1.5;
}

/* ── Pillar Detail (solutions page) ───────────────────────── */
.pillar-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}
.pillar-section:last-child { border-bottom: none; }

.pillar-section .grid-2 { align-items: start; gap: 64px; }

.pillar-header { margin-bottom: 32px; }

.pillar-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(106,170,59,0.1);
  border: 1px solid var(--border-green);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.pillar-features { margin-top: 28px; }
.pillar-features li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--grey-2);
}
.pillar-features li:last-child { border-bottom: none; }
.pillar-features li::before {
  content: '▸';
  color: var(--green);
  flex-shrink: 0;
  margin-top: 1px;
}

.pillar-sub-cards { display: flex; flex-direction: column; gap: 16px; }

.pillar-sub-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: all var(--transition);
}
.pillar-sub-card:hover {
  border-color: var(--border-green);
  background: var(--bg-4);
}

.pillar-sub-card h4 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.pillar-sub-card p {
  font-size: 0.82rem;
  color: var(--grey-3);
}

/* ── Projects Gallery ─────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.project-card {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-3);
}

.project-card-wide { grid-column: span 2; }

.project-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-card-img { transform: scale(1.04); }

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity var(--transition);
}
.project-card:hover .project-overlay { opacity: 1; }

.project-overlay-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 6px;
}
.project-overlay h3 { font-size: 1.05rem; }

/* Category Filter */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--grey-2);
  transition: all var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

/* ── Team Cards ───────────────────────────────────────────── */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.team-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  transition: all var(--transition);
}
.team-card:hover {
  border-color: var(--border-green);
  transform: translateY(-3px);
}

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-4);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--green);
  border: 2px solid var(--border-green);
}

.team-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.team-card .team-role { font-size: 0.8rem; color: var(--green); font-weight: 600; margin-bottom: 12px; }
.team-card p { font-size: 0.85rem; color: var(--grey-3); line-height: 1.6; }

.team-pedigree {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.pedigree-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--grey-3);
  background: var(--bg-4);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 3px;
}

/* ── Contact ──────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: start; }

.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.contact-icon {
  width: 44px;
  height: 44px;
  background: rgba(106,170,59,0.1);
  border: 1px solid var(--border-green);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-info-item h4 { font-size: 0.8rem; color: var(--grey-3); margin-bottom: 4px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.contact-info-item p { font-size: 0.95rem; color: var(--grey-1); line-height: 1.5; }

.contact-form { background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; }

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

.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--grey-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 12px 16px;
  transition: border-color var(--transition);
  outline: none;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--grey-3); }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--green); }
.form-field select { appearance: none; }
.form-field textarea { resize: vertical; min-height: 120px; }

/* ── Page Hero (inner pages) ──────────────────────────────── */
.page-hero {
  padding: calc(var(--nav-h) + 60px) 0 64px;
  background:
    radial-gradient(ellipse 50% 60% at 80% 50%, rgba(106,170,59,0.05) 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 { margin-bottom: 16px; }
.page-hero p { font-size: 1.05rem; color: var(--grey-2); max-width: 520px; line-height: 1.7; }

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

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

.footer-brand p {
  font-size: 0.875rem;
  color: var(--grey-3);
  margin-top: 16px;
  max-width: 260px;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-3);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: var(--grey-2);
  margin-bottom: 10px;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--green); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--grey-3);
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Badges / Tags ────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  background: rgba(106,170,59,0.12);
  color: var(--green);
  border: 1px solid var(--border-green);
}

/* ── Blockquote / Callout ─────────────────────────────────── */
.callout {
  background: rgba(106,170,59,0.06);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 24px 28px;
  margin: 32px 0;
}
.callout p { font-size: 1.05rem; color: var(--grey-1); line-height: 1.7; font-style: italic; }

/* ── Animations ───────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

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

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card-wide { grid-column: span 1; }
  .team-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
  .section { padding: 64px 0; }
  .container { padding: 0 16px; }

  .pillar-section .grid-2 { gap: 32px; }
}

@media (max-width: 480px) {
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; justify-content: center; }
  .filter-bar { gap: 6px; }
}
