/* ==========================================================
   Navara Cyber Tech — Stylesheet
   ธีม: เทคโนโลยี/ไซเบอร์ซีเคียวริตี้ โทนน้ำเงินเข้ม-ฟ้าไซแอน
   ========================================================== */

:root {
  --navy-950: #050b18;
  --navy-900: #0a1428;
  --navy-800: #0f1e3a;
  --navy-700: #16294d;
  --navy-600: #1f3760;
  --cyan-400: #35d0e8;
  --cyan-300: #6fe3f2;
  --cyan-500: #14b8cf;
  --ink-900: #0b1220;
  --ink-700: #33415c;
  --ink-500: #5b6b88;
  --paper-0: #ffffff;
  --paper-50: #f5f8fc;
  --paper-100: #eaf1f9;
  --border-soft: #dde6f2;
  --success-bg: #e5f9ee;
  --success-text: #10743e;
  --error-bg: #fdeceb;
  --error-text: #b3261e;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-soft: 0 10px 30px rgba(10, 20, 40, 0.08);
  --shadow-strong: 0 20px 45px rgba(5, 11, 24, 0.35);
  --font-body: "Noto Sans Thai", "Sarabun", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--paper-0);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy-900);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1.35;
  margin: 0 0 16px;
}
h1 { font-size: clamp(2rem, 4vw, 2.85rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 16px; color: var(--ink-700); }

a { color: var(--cyan-500); text-decoration: none; }
a:hover { text-decoration: underline; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--cyan-500);
  margin-bottom: 10px;
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--cyan-500), var(--cyan-400));
  color: var(--navy-950);
  box-shadow: 0 10px 24px rgba(53, 208, 232, 0.35);
}
.btn-primary:hover { box-shadow: 0 14px 30px rgba(53, 208, 232, 0.45); }
.btn-outline {
  background: transparent;
  border-color: var(--navy-700);
  color: var(--navy-800);
}
.btn-outline:hover { background: var(--navy-800); color: #fff; }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 20, 40, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo { height: 40px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name-th { font-weight: 700; font-size: 1.02rem; color: #fff; }
.brand-name-en { font-size: 0.65rem; letter-spacing: 0.12em; color: var(--cyan-300); }

.primary-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  display: inline-block;
  color: #cfe0f5;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.primary-nav a:hover,
.primary-nav a.active { background: rgba(255, 255, 255, 0.08); color: #fff; }
.primary-nav a.btn-nav-cta {
  background: linear-gradient(135deg, var(--cyan-500), var(--cyan-400));
  color: var(--navy-950);
}
.primary-nav a.btn-nav-cta:hover { background: linear-gradient(135deg, var(--cyan-400), var(--cyan-300)); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 26px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(circle at 80% 0%, var(--navy-700), var(--navy-950) 65%);
  color: #fff;
  padding: 88px 0 76px;
  overflow: hidden;
  position: relative;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
}
.hero-text h1 { color: #fff; }
.hero-lead { color: #c6d6ec; font-size: 1.1rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.hero .eyebrow { color: var(--cyan-300); }
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 280px;
}
.hero-shield {
  font-size: 9rem;
  filter: drop-shadow(0 0 40px rgba(53, 208, 232, 0.55));
  animation: float 5s ease-in-out infinite;
}
.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(53, 208, 232, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 208, 232, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle, black, transparent 75%);
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ---------- Stats strip ---------- */
.stats-strip { background: var(--navy-900); color: #fff; padding: 34px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.stat-number { display: block; font-size: 1.9rem; font-weight: 800; color: var(--cyan-300); }
.stat-label { font-size: 0.88rem; color: #b9c8de; }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section-heading { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.section-lead { color: var(--ink-500); }
.section-cta { text-align: center; margin-top: 36px; }

.page-hero {
  background: linear-gradient(180deg, var(--navy-900), var(--navy-800));
  color: #fff;
  padding: 64px 0;
  text-align: center;
}
.page-hero h1 { color: #fff; max-width: 780px; margin: 0 auto 14px; }
.page-hero-lead { color: #c6d6ec; max-width: 640px; margin: 0 auto; }
.page-hero .eyebrow { color: var(--cyan-300); }

/* ---------- Cards / Grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--paper-50);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.card-icon { font-size: 2rem; margin-bottom: 14px; }
.card h3 { margin-bottom: 10px; }
.card-link { font-weight: 700; }

.badge {
  display: inline-block;
  background: var(--navy-800);
  color: var(--cyan-300);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.portfolio-client { color: var(--ink-500); font-size: 0.9rem; margin-bottom: 10px; }

.empty-state {
  text-align: center;
  padding: 40px;
  background: var(--paper-50);
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius-md);
  color: var(--ink-500);
}
.empty-state code {
  background: var(--paper-100);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ---------- Why us ---------- */
.why-us { background: var(--paper-50); }
.why-us-inner { max-width: 760px; margin: 0 auto; text-align: left; }
.check-list { list-style: none; padding: 0; margin: 24px 0; }
.check-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 14px;
  color: var(--ink-700);
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--cyan-500);
  font-weight: 800;
}

/* ---------- About page ---------- */
.about-intro { max-width: 780px; margin: 0 auto; }
.note-placeholder { color: var(--ink-500); font-size: 0.85rem; font-style: italic; }

/* ---------- Services page ---------- */
.service-list { display: flex; flex-direction: column; gap: 56px; }
.service-detail {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  align-items: start;
  scroll-margin-top: 100px;
}
.service-detail.reverse { direction: rtl; }
.service-detail.reverse > * { direction: ltr; }
.service-detail-icon {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-lg);
  background: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
}
.service-short { font-weight: 600; color: var(--ink-900); }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
}
.contact-info-list li { margin-bottom: 14px; }
.contact-form-wrap {
  background: var(--paper-50);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.92rem;
}
.required { color: var(--error-text); }
.form-row { margin-bottom: 18px; }
.form-row-half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.98rem;
  background: #fff;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--cyan-500);
  box-shadow: 0 0 0 3px rgba(53, 208, 232, 0.18);
}
.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alert {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.95rem;
}
.alert ul { margin: 0; padding-left: 20px; }
.alert-success { background: var(--success-bg); color: var(--success-text); }
.alert-error { background: var(--error-bg); color: var(--error-text); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: #fff;
  text-align: center;
}
.cta-band-inner { max-width: 620px; margin: 0 auto; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c6d6ec; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: #b9c8de; padding-top: 56px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 40px;
}
.footer-col h3 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #b9c8de; }
.footer-col a:hover { color: var(--cyan-300); }
.brand-footer { color: #fff; margin-bottom: 14px; }
.brand-footer .brand-name-th { color: #fff; }
.brand-footer .brand-logo { height: 34px; }
.footer-social { font-size: 0.9rem; margin-top: 16px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-visual { height: 200px; }
  .card-grid, .card-grid-2, .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .service-detail { grid-template-columns: 1fr; }
  .service-detail-icon { width: 72px; height: 72px; font-size: 2rem; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--navy-900);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .primary-nav.open { max-height: 400px; }
  .primary-nav ul { flex-direction: column; align-items: stretch; padding: 12px 24px 24px; gap: 4px; }
  .primary-nav a { display: block; text-align: center; }
  .card-grid, .card-grid-2, .card-grid-4 { grid-template-columns: 1fr; }
  .form-row-half { grid-template-columns: 1fr; }
}
