/* ============================================
   หมูกรอบเมืองนนท์ — Golden Red Feng Shui Theme
   ============================================ */

:root {
  --red: #8b0000;
  --red-dark: #5c0000;
  --red-deep: #3d0000;
  --gold: #d4af37;
  --gold-light: #f4d06f;
  --gold-bright: #ffd700;
  --cream: #fdf6e3;
  --bg: #1a0606;
  --bg-soft: #2a0a0a;
  --text: #f5e6c8;
  --text-muted: #c9b896;
  --white: #fffaf0;
  --shadow-gold: 0 8px 32px rgba(212, 175, 55, 0.25);
  --shadow-red: 0 8px 32px rgba(139, 0, 0, 0.4);
  --radius: 14px;
  --radius-lg: 24px;
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Noto Serif Thai', Georgia, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.gold { color: var(--gold-light); }

/* Top decorative border */
.top-border {
  height: 6px;
  background: linear-gradient(90deg,
    var(--red-deep) 0%, var(--red) 20%, var(--gold) 40%,
    var(--gold-bright) 50%, var(--gold) 60%, var(--red) 80%, var(--red-deep) 100%);
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 32px;
  font-family: inherit; font-size: 1rem; font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  letter-spacing: 0.02em;
}
.btn--primary {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--gold-light);
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}
.btn--primary:hover {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--red-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(212, 175, 55, 0.4);
}
.btn--ghost {
  background: transparent;
  color: var(--gold-light);
  border-color: var(--gold);
}
.btn--ghost:hover {
  background: var(--gold);
  color: var(--red-deep);
  transform: translateY(-2px);
}
.btn--small { padding: 8px 20px; font-size: 0.875rem; }

/* Header */
.header {
  position: fixed; top: 6px; left: 0; right: 0; z-index: 999;
  background: rgba(26, 6, 6, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  transition: all 0.3s var(--ease);
}
.header.scrolled {
  background: rgba(26, 6, 6, 0.95);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo {
  border-radius: 50%;
  border: 2px solid var(--gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}
.brand__name {
  font-size: 1.25rem; font-weight: 700;
  color: var(--gold-light);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}
.nav { display: flex; align-items: center; gap: 32px; }
.nav__link {
  color: var(--text-muted); font-weight: 500;
  position: relative; transition: color 0.2s;
}
.nav__link::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--gold);
  transition: width 0.3s var(--ease);
}
.nav__link:hover { color: var(--gold-light); }
.nav__link:hover::after { width: 100%; }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  width: 26px; height: 3px; background: var(--gold);
  border-radius: 2px; transition: all 0.3s var(--ease);
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 100px 0 60px;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(139, 0, 0, 0.3) 0%, transparent 50%),
    linear-gradient(135deg, var(--red-deep) 0%, var(--bg) 50%, var(--bg-soft) 100%);
}
.hero__overlay {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, transparent, transparent 60px, rgba(212, 175, 55, 0.03) 60px, rgba(212, 175, 55, 0.03) 61px);
  pointer-events: none;
}
.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.hero__eyebrow {
  color: var(--gold); font-size: 1rem; letter-spacing: 0.15em;
  text-transform: uppercase; margin-bottom: 16px;
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 20px;
  background: rgba(212, 175, 55, 0.05);
}
.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800; line-height: 1.15;
  color: var(--white);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  margin-bottom: 20px;
}
.hero__desc {
  font-size: 1.2rem; color: var(--text-muted); margin-bottom: 24px;
}
.hero__locations {
  display: flex; flex-wrap: wrap; margin-bottom: 36px;
}
.hero__locations li {
  padding: 0 16px;
  font-size: 1rem; color: var(--text-muted);
  position: relative;
}
.hero__locations li:first-child { padding-left: 0; }
.hero__locations li + li::before {
  content: ''; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 1em;
  background: rgba(212, 175, 55, 0.4);
}
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.hero__scroll {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--gold-light); font-weight: 600; font-size: 1rem;
  padding: 12px 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.hero__scroll svg { width: 14px; height: 14px; fill: currentColor; transition: transform 0.3s var(--ease); }
.hero__scroll:hover { color: var(--gold); border-bottom-color: var(--gold); }
.hero__scroll:hover svg { transform: translateY(3px); }
.hero__media {
  position: relative;
  display: flex; justify-content: center;
}
.hero__img {
  border-radius: var(--radius-lg);
  border: 3px solid var(--gold);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 48px rgba(212, 175, 55, 0.25);
  width: 100%; max-width: 460px; object-fit: cover;
  aspect-ratio: 3/4;
  display: block;
}

/* Marquee */
.marquee {
  background: linear-gradient(90deg, var(--red-dark), var(--red), var(--red-dark));
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  overflow: hidden;
  padding: 14px 0;
}
.marquee__track {
  display: flex; gap: 0;
  animation: marquee 30s linear infinite;
  white-space: nowrap;
}
.marquee__track span {
  font-size: 0.95rem; font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.1em;
  padding-right: 40px;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Section base */
.section { padding: 100px 0; position: relative; }
.section__eyebrow {
  color: var(--gold); font-size: 0.9rem; letter-spacing: 0.15em;
  text-transform: uppercase; margin-bottom: 12px; font-weight: 600;
}
.section__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700; color: var(--white);
  margin-bottom: 24px; line-height: 1.2;
}
.section__head { text-align: center; margin-bottom: 56px; }
.section__head .section__eyebrow { display: inline-block; }
.section__head .section__title { margin-bottom: 0; }

/* About */
.about__content {
  max-width: 760px; margin: 0 auto 48px; text-align: center;
}
.about__text {
  color: var(--text-muted); font-size: 1.1rem; line-height: 1.8;
}
.about__gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.about__thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 2px solid rgba(212, 175, 55, 0.25);
}

/* Why */
.why { background: var(--bg-soft); }
.why__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.feature {
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.15) 0%, rgba(26, 6, 6, 0.5) 100%);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  transition: all 0.3s var(--ease);
  position: relative; overflow: hidden;
}
.feature::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0); transition: transform 0.3s var(--ease);
}
.feature:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}
.feature:hover::before { transform: scaleX(1); }
.feature__icon {
  font-size: 2.5rem; margin-bottom: 16px;
  display: inline-block;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.3));
}
.feature__title {
  font-size: 1.2rem; font-weight: 700; color: var(--gold-light);
  margin-bottom: 10px;
}
.feature__desc { color: var(--text-muted); font-size: 0.95rem; }

/* Story */
.story__inner {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 60px; align-items: center;
}
.story__text {
  color: var(--text-muted); font-size: 1.05rem; margin-bottom: 18px;
}
.story__text strong { color: var(--gold-light); font-weight: 600; }
.story__cta {
  font-size: 1.3rem; font-weight: 700; color: var(--white);
  margin-top: 28px;
}
.story__media { position: relative; text-align: center; }
.story__img {
  border-radius: var(--radius-lg);
  border: 3px solid var(--gold);
  box-shadow: var(--shadow-gold);
  margin: 0 auto;
  max-width: 400px;
}
.story__tag {
  margin-top: 16px;
  color: var(--gold-light); font-weight: 700; font-size: 1.1rem;
}

/* Price */
.price { background: var(--bg-soft); }
.price__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  max-width: 900px; margin: 0 auto;
}
.price-card {
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.2) 0%, rgba(26, 6, 6, 0.6) 100%);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.price-card__head {
  text-align: center; padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  background: rgba(139, 0, 0, 0.15);
}
.price-card__title { font-size: 1.5rem; font-weight: 700; color: var(--gold-light); }
.price-card__sub { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }
.price-table { width: 100%; border-collapse: collapse; }
.price-table th {
  padding: 14px 20px; text-align: left;
  font-size: 0.85rem; color: var(--gold);
  text-transform: uppercase; letter-spacing: 0.1em;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}
.price-table td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.08);
  color: var(--text); font-size: 1rem;
}
.price-table td:last-child { text-align: right; color: var(--gold-light); font-weight: 600; }
.price-table tr:last-child td { border-bottom: none; }
.price-table__best td {
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-bright); font-weight: 700;
}
.price__cta { text-align: center; margin-top: 48px; }

/* Contact */
.contact__inner {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 60px; align-items: center;
}
.contact__text { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 32px; }
.contact__links { display: flex; flex-direction: column; gap: 16px; }
.contact-link {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 24px;
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius);
  transition: all 0.3s var(--ease);
}
.contact-link:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--gold);
  transform: translateX(6px);
}
.contact-link__icon { width: 22px; height: 22px; fill: var(--gold); flex-shrink: 0; }
.contact-link__label { color: var(--text-muted); font-size: 0.85rem; min-width: 80px; }
.contact-link__value { color: var(--gold-light); font-weight: 600; margin-left: auto; }
.contact__qr { text-align: center; }
.contact__qr-img {
  border-radius: var(--radius);
  border: 3px solid var(--gold);
  box-shadow: var(--shadow-gold);
  margin: 0 auto;
}
.contact__qr-label {
  margin-top: 16px; color: var(--gold-light); font-weight: 600;
}

/* Footer */
.footer {
  background: var(--red-deep);
  border-top: 2px solid var(--gold);
  padding: 48px 0 32px;
}
.footer__inner {
  display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: center;
}
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__logo { border-radius: 50%; border: 2px solid var(--gold); }
.footer__name { font-size: 1.1rem; font-weight: 700; color: var(--gold-light); }
.footer__tag { font-size: 0.85rem; color: var(--text-muted); }
.footer__nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer__nav a { color: var(--text-muted); transition: color 0.2s; }
.footer__nav a:hover { color: var(--gold-light); }
.footer__copy {
  width: 100%; text-align: center;
  color: var(--text-muted); font-size: 0.85rem;
  padding-top: 24px; border-top: 1px solid rgba(212, 175, 55, 0.15);
  margin-top: 16px;
}

/* Floating LINE */
.float-line {
  position: fixed; bottom: 28px; right: 28px;
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(212, 175, 55, 0.3);
  z-index: 998;
  transition: all 0.3s var(--ease);
  animation: pulse-gold 2.5s ease-in-out infinite;
}
.float-line:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 32px rgba(212, 175, 55, 0.5);
}
@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(212, 175, 55, 0.3); }
  50% { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 28px rgba(212, 175, 55, 0.6); }
}

/* Scroll reveal */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero__content { order: 2; }
  .hero__media { order: 1; }
  .hero__locations { justify-content: center; }
  .hero__actions { justify-content: center; }
  .hero__eyebrow { display: inline-block; }
  .about__gallery { grid-template-columns: repeat(2, 1fr); }
  .why__grid { grid-template-columns: repeat(2, 1fr); }
  .story__inner { grid-template-columns: 1fr; gap: 40px; }
  .price__grid { grid-template-columns: 1fr; }
  .contact__inner { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 640px) {
  .nav {
    position: fixed; top: 78px; left: 0; right: 0;
    background: rgba(26, 6, 6, 0.98);
    flex-direction: column; gap: 0;
    padding: 16px;
    border-bottom: 1px solid var(--gold);
    transform: translateY(-150%);
    transition: transform 0.4s var(--ease);
  }
  .nav.open { transform: translateY(0); }
  .nav__link { padding: 14px 0; width: 100%; text-align: center; border-bottom: 1px solid rgba(212, 175, 55, 0.1); }
  .nav__link:last-of-type { border-bottom: none; }
  .nav .btn { margin-top: 12px; }
  .nav-toggle { display: flex; }
  .brand__name { font-size: 1rem; }
  .section { padding: 70px 0; }
  .why__grid { grid-template-columns: 1fr; }
  .about__gallery { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__nav { justify-content: center; }
  .float-line { bottom: 20px; right: 20px; width: 48px; height: 48px; font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
