:root {
  --bg: #070507;
  --bg-elev: #12090c;
  --ink: #f6efe9;
  --muted: #b9aaa0;
  --crimson: #d31433;
  --crimson-deep: #8a0e22;
  --silver: #e2e7ef;
  --line: rgba(226, 231, 239, 0.14);
  --pad: clamp(1rem, 4vw, 2rem);
  --max: 1100px;
  --radius: 0.7rem;
  --font-display: 'Syne', 'Noto Sans Thai', sans-serif;
  --font-body: 'Noto Sans Thai', system-ui, sans-serif;
  --header-h: 4.25rem;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(980px 560px at 78% -8%, rgba(211, 20, 51, 0.2), transparent 55%),
    radial-gradient(720px 420px at 8% 18%, rgba(90, 18, 28, 0.22), transparent 50%),
    var(--bg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid #ff6b7d;
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: #000;
  color: #fff;
  padding: 0.55rem 0.8rem;
}

.skip:focus {
  left: 0.6rem;
  top: calc(0.6rem + var(--safe-top));
}

/* —— Header —— */
.top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  padding: calc(0.55rem + var(--safe-top)) var(--pad) 0;
}

.top--solid {
  position: sticky;
  top: 0;
  background: rgba(7, 5, 7, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
}

.top__inner {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 3.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  flex-shrink: 0;
  line-height: 0;
}

.brand img {
  width: clamp(104px, 28vw, 150px);
  height: auto;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.5));
}

.top__nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.55rem, 2vw, 1rem);
  flex-wrap: wrap;
}

.top__nav > a:not(.top__ext) {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--muted);
  padding: 0.45rem 0.2rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.top__nav > a:not(.top__ext):hover,
.top__nav > a.is-active {
  color: #fff;
}

.top__ext {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 40px;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--silver);
  background: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.top__ext:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 0;
  display: block;
  overflow: clip;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  transform: scale(1.04);
  animation: ken 20s ease-in-out infinite alternate;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 5, 7, 0.55) 0%, rgba(7, 5, 7, 0.45) 45%, rgba(7, 5, 7, 0.92) 100%),
    linear-gradient(100deg, rgba(7, 5, 7, 0.8) 0%, rgba(7, 5, 7, 0.28) 58%, rgba(7, 5, 7, 0.55) 100%);
}

.hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding:
    calc(4.6rem + var(--safe-top))
    var(--pad)
    1.5rem;
}

.hero__latin {
  margin: 0 0 0.1rem;
  font-family: var(--font-display);
  font-size: clamp(0.75rem, 1.8vw, 0.88rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--silver);
}

.hero__brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.35rem, 8vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.035em;
  color: #fff;
  text-shadow: 0 10px 36px rgba(0, 0, 0, 0.55), 0 0 36px rgba(211, 20, 51, 0.22);
  word-break: keep-all;
}

.hero__lead {
  margin: 0.4rem 0 0;
  max-width: 30rem;
  font-size: clamp(0.92rem, 2.1vw, 1.05rem);
  line-height: 1.4;
  color: var(--muted);
}

.hero__actions {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: linear-gradient(135deg, var(--crimson), var(--crimson-deep));
  color: #fff;
  box-shadow: 0 10px 28px rgba(211, 20, 51, 0.34);
  animation: glow 2.8s ease-in-out infinite;
}

.btn--ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.34);
}

.btn__arrow {
  transition: transform 0.18s ease;
}

.btn--primary:hover .btn__arrow {
  transform: translateX(3px);
}

.hero__note {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: rgba(185, 170, 160, 0.92);
  max-width: 36rem;
}

.hero__note a {
  color: var(--silver);
  text-underline-offset: 3px;
}

/* —— Sections —— */
.strip {
  padding: clamp(1.35rem, 3.5vw, 2.25rem) var(--pad);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 9, 12, 0.95), rgba(7, 5, 7, 0.35));
}

.strip__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 0.85rem 1.15rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.strip__item {
  padding: 0.15rem 0;
}

.strip__item h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.4vw, 1.18rem);
  letter-spacing: -0.02em;
}

.strip__item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.about {
  padding: clamp(1.75rem, 4vw, 3rem) var(--pad);
}

.about__inner {
  max-width: 720px;
  margin: 0 auto;
}

.about h2 {
  margin: 0 0 0.8rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 4vw, 2.05rem);
  letter-spacing: -0.03em;
}

.about p {
  margin: 0 0 0.95rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.about strong {
  color: var(--ink);
  font-weight: 700;
}

.about__link {
  color: #ff6b7d;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.faq-list {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.85rem;
}

.faq-item {
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.faq-item h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.faq-item p {
  margin: 0;
}

.home-posts {
  padding: clamp(1.35rem, 3.5vw, 2.5rem) var(--pad) clamp(1.75rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}

.home-posts__inner {
  max-width: var(--max);
  margin: 0 auto;
}

.home-posts__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.home-posts__head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.4vw, 1.9rem);
  letter-spacing: -0.03em;
}

.home-posts__head a {
  color: var(--silver);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.home-posts__grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.18s, transform 0.18s, background 0.18s;
}

.post-card:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.post-card h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.08rem;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.post-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  flex: 1;
}

.post-card__more {
  display: inline-block;
  margin-top: 0.85rem;
  color: #ff6b7d;
  font-weight: 700;
  font-size: 0.88rem;
}

/* —— Footer —— */
.foot {
  border-top: 1px solid var(--line);
  padding: 1.15rem var(--pad) calc(1.15rem + var(--safe-bottom));
  background: rgba(0, 0, 0, 0.25);
}

.foot__inner {
  max-width: var(--max);
  margin: 0 auto;
}

.foot__inner--split {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.15rem;
  justify-content: space-between;
  align-items: center;
}

.foot p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.foot a {
  color: var(--silver);
}

.foot__links {
  margin: 0 !important;
}

.foot__links a {
  text-decoration: none;
}

.foot__links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* —— Blog / article —— */
.page-article {
  background:
    radial-gradient(800px 420px at 90% 0%, rgba(211, 20, 51, 0.12), transparent 55%),
    var(--bg);
}

.article {
  padding: 1.25rem var(--pad) 2.25rem;
}

.article__inner {
  max-width: 740px;
  margin: 0 auto;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.crumbs a {
  color: var(--silver);
  text-decoration: none;
}

.crumbs a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article__head h1 {
  margin: 0.15rem 0 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 5.2vw, 2.45rem);
  letter-spacing: -0.03em;
  line-height: 1.18;
}

.article__meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.article__lead {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 2.4vw, 1.08rem);
}

.prose h2 {
  margin: 1.85rem 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3vw, 1.32rem);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.prose p {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.prose a {
  color: #ff6b7d;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.article__cta {
  margin: 1.75rem 0 0.25rem;
}

.article__related {
  margin-top: 2.25rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
}

.article__related h2 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.article__related ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.article__related a {
  display: block;
  color: var(--silver);
  text-decoration: none;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.18s, background 0.18s;
}

.article__related a:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
}

.post-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.35rem;
}

/* —— Motion —— */
@keyframes ken {
  from {
    transform: scale(1.05) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.1) translate3d(-1.2%, -0.8%, 0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 10px 28px rgba(211, 20, 51, 0.3);
  }
  50% {
    box-shadow: 0 12px 34px rgba(211, 20, 51, 0.48);
  }
}

/* —— Responsive —— */
@media (max-width: 900px) {
  .home-posts__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .strip__inner,
  .home-posts__grid {
    grid-template-columns: 1fr;
  }

  .hero__content {
    padding-top: calc(4.2rem + var(--safe-top));
    padding-bottom: 1.15rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 0.7rem;
    gap: 0.45rem;
  }

  .btn {
    width: 100%;
  }

  .hero__note {
    font-size: 0.78rem;
    margin-top: 0.45rem;
  }

  .top__ext span[aria-hidden='true'] {
    display: none;
  }

  .home-posts__head {
    align-items: center;
  }
}

@media (max-width: 420px) {
  .hero__brand {
    font-size: clamp(2.35rem, 13vw, 3rem);
  }

  .top__ext {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__img,
  .btn--primary,
  .hero__content {
    animation: none !important;
  }
}

@media (hover: none) {
  .btn:hover,
  .post-card:hover {
    transform: none;
  }
}
