/* Top Casinos Thailand — static site */

:root {
  --purple: #5a1f5a;
  --purple-dark: #4a154b;
  --purple-light: #7b3a7b;
  --gold: #e6c200;
  --gold-text: #f5d547;
  --yellow-btn: #f1c40f;
  --text: #171717;
  --muted: #5c5c5c;
  --border: #e2e2e2;
  --border-strong: #d4d4d4;
  --header-bg: #fff;
  --surface: #fafafa;
  --surface-elevated: #ffffff;
  --max: 1140px;
  --prose-max: 42rem;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 15, 15, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 15, 15, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 15, 15, 0.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-th: "Sarabun", "Prompt", system-ui, sans-serif;
  --section-space: clamp(2.5rem, 5vw, 3.75rem);
  --section-space-tight: clamp(1.75rem, 4vw, 2.5rem);
  --copy-size: 1.0625rem;
  --copy-leading: 1.72;
  --heading-to-body: 1.5rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  background: var(--surface-elevated);
}

body.lang-th {
  font-family: var(--font-th);
}

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

a {
  color: var(--purple);
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.125rem, 4vw, 1.5rem);
  padding-right: clamp(1.125rem, 4vw, 1.5rem);
}

/* Header */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 10;
}

.site-header .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: clamp(168px, 42vw, 220px);
  height: auto;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.brand:hover .brand-logo {
  opacity: 0.88;
}

.nav-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  margin-left: auto;
  justify-content: flex-end;
}

.nav-main__start {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
}

.nav-main__start > a:not(.nav-legal-sibling) {
  text-decoration: none;
  font-weight: 600;
}

.nav-main__start > a:not(.nav-legal-sibling):hover {
  text-decoration: underline;
}

/* Language switch — minimal segmented control */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 2px;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.lang-toggle__opt {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.45rem;
  min-height: 1.5rem;
  border: none;
  border-radius: 5px;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  color: rgba(0, 0, 0, 0.4);
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease;
}

.lang-toggle > .lang-toggle__opt + .lang-toggle__opt::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: rgba(0, 0, 0, 0.08);
  transform: translateX(-0.5px);
}

.lang-toggle__opt--en {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.625rem;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

.lang-toggle__opt:hover:not(.is-active) {
  text-decoration: none;
  color: rgba(0, 0, 0, 0.72);
  background: rgba(0, 0, 0, 0.04);
}

.lang-toggle__opt:focus {
  outline: none;
}

.lang-toggle__opt:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(90, 31, 90, 0.35);
  z-index: 1;
}

.lang-toggle__opt.is-active {
  color: var(--purple-dark);
  background: rgba(74, 21, 75, 0.07);
  font-weight: 600;
  cursor: default;
  user-select: none;
}

@media (max-width: 520px) {
  .nav-main {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .lang-toggle {
    margin-left: auto;
  }
}

/* Hero — full-bleed background, overlay, no content box */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(22rem, 52vh, 38rem);
  padding: clamp(3.25rem, 9vw, 5.75rem) 0 clamp(3rem, 7vw, 4.5rem);
  overflow: hidden;
  border-bottom: none;
}

.hero__layers {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Rich background — CSS only (no external images, no broken URLs) */
.hero__gradient {
  position: absolute;
  inset: 0;
  background-color: #0c0610;
  background-image:
    radial-gradient(ellipse 130% 90% at 50% -25%, rgba(201, 162, 39, 0.22) 0%, transparent 52%),
    radial-gradient(ellipse 85% 70% at 100% 40%, rgba(90, 31, 90, 0.45) 0%, transparent 58%),
    radial-gradient(ellipse 75% 65% at 0% 85%, rgba(45, 18, 64, 0.5) 0%, transparent 55%),
    linear-gradient(168deg, #1f1028 0%, #120a16 42%, #0a060c 100%);
}

/* Readability overlay */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.38) 0%,
    rgba(0, 0, 0, 0.58) 48%,
    rgba(0, 0, 0, 0.72) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  margin: 0 auto;
  padding-left: clamp(1.125rem, 4vw, 1.5rem);
  padding-right: clamp(1.125rem, 4vw, 1.5rem);
  text-align: center;
  background: none;
  border: none;
  box-shadow: none;
}

.hero__title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.75rem, 4.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.03em;
  color: #fff;
  text-wrap: balance;
}

.hero__sub {
  margin: 0 auto 2.125rem;
  max-width: 36rem;
  font-size: clamp(1.0625rem, 2.35vw, 1.1875rem);
  line-height: 1.62;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.125rem;
  margin-bottom: 2.35rem;
  padding: 0.9rem 2rem;
  font-size: 1.03125rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #1a0f08 !important;
  text-decoration: none !important;
  background: linear-gradient(180deg, #f2dc9a 0%, #d4af37 46%, #b8941f 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-md);
  box-shadow:
    var(--shadow-sm),
    0 8px 32px rgba(201, 162, 39, 0.28);
  transition:
    filter 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.hero__cta:hover {
  filter: brightness(1.06);
  box-shadow:
    0 6px 12px rgba(0, 0, 0, 0.2),
    0 16px 48px rgba(201, 162, 39, 0.45);
  transform: translateY(-2px);
}

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

.hero__cta:focus {
  outline: none;
}

.hero__cta:focus-visible {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.95),
    0 0 0 5px rgba(201, 162, 39, 0.55),
    0 12px 40px rgba(201, 162, 39, 0.35);
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero__trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.82);
}

.hero__trust-item::before {
  content: "";
  display: block;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: #e8c547;
  box-shadow: 0 0 0 2px rgba(232, 197, 71, 0.25);
}

@media (max-width: 520px) {
  .hero__trust {
    flex-direction: column;
    gap: 0.85rem;
  }

  .hero__cta {
    width: 100%;
    max-width: 22rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

#compare {
  scroll-margin-top: 1.25rem;
}

#notify {
  scroll-margin-top: 1.25rem;
}

/* Casinos preview + coming soon (replaces placeholder tables) */
.casinos-preview {
  max-width: var(--prose-max);
  margin: 0 auto;
  padding: var(--section-space) 0 calc(var(--section-space-tight) + 0.35rem);
  border-bottom: 1px solid var(--border);
}

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

.casinos-preview .section-title {
  margin-top: 0;
  margin-bottom: var(--heading-to-body);
}

.casinos-preview__text {
  margin: 0 auto 1.2rem;
  max-width: 38rem;
  font-size: var(--copy-size);
  line-height: var(--copy-leading);
  color: var(--text);
}

.casinos-preview__intro .casinos-preview__text:last-of-type {
  margin-bottom: clamp(1.85rem, 4.2vw, 2.35rem);
}

.coming-soon-card {
  max-width: 27rem;
  margin: 0 auto;
  padding: clamp(2rem, 4.75vw, 2.6rem) clamp(1.75rem, 4vw, 2.2rem);
  text-align: center;
  background: linear-gradient(180deg, #fdfcfd 0%, #f5f2f8 100%);
  border: 1px solid rgba(74, 21, 75, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm), 0 16px 48px rgba(74, 21, 75, 0.07);
}

.coming-soon-card__title {
  margin: 0 0 1rem;
  font-size: clamp(1.1rem, 2.55vw, 1.28rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--purple-dark);
}

.coming-soon-card__lead {
  margin: 0 auto 1.5rem;
  max-width: 23rem;
  font-size: 1rem;
  line-height: var(--copy-leading);
  color: var(--muted);
}

.coming-soon-card__list {
  list-style: none;
  margin: 0 auto 2rem;
  padding: 0;
  text-align: left;
  max-width: 19.5rem;
}

.coming-soon-card__list li {
  position: relative;
  padding: 0.52rem 0 0.52rem 1.7rem;
  font-size: 0.96875rem;
  line-height: 1.55;
  color: var(--text);
}

.coming-soon-card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8c547 0%, #b8941f 100%);
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.2);
}

.coming-soon-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.125rem;
  padding: 0.85rem 1.5rem;
  font-size: 1.03125rem;
  font-weight: 700;
  letter-spacing: 0.028em;
  color: #1a0f08 !important;
  text-decoration: none !important;
  background: linear-gradient(180deg, #f2dc9a 0%, #d4af37 48%, #b8941f 100%);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: var(--radius-md);
  box-shadow:
    var(--shadow-sm),
    0 6px 24px rgba(201, 162, 39, 0.22);
  transition:
    filter 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.coming-soon-card__cta:hover {
  filter: brightness(1.04);
  text-decoration: none !important;
  transform: translateY(-1px);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 10px 32px rgba(201, 162, 39, 0.3);
}

.coming-soon-card__cta:focus {
  outline: none;
}

.coming-soon-card__cta:focus-visible {
  box-shadow:
    0 0 0 2px var(--surface-elevated),
    0 0 0 5px rgba(201, 162, 39, 0.42);
}

/* Headings */
h2.section-title {
  text-align: center;
  color: var(--purple-dark);
  font-size: clamp(1.22rem, 2.65vw, 1.48rem);
  margin: var(--section-space) 0 var(--heading-to-body);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.022em;
  text-wrap: balance;
  max-width: 22em;
  margin-left: auto;
  margin-right: auto;
}

.container > .casinos-preview + .prose h2.section-title {
  margin-top: clamp(1.85rem, 4vw, 2.65rem);
}

.faq-wrap > h2.section-title {
  margin-top: clamp(1.65rem, 3.5vw, 2.35rem);
}

h3.block-title {
  color: var(--purple-dark);
  font-size: 1.125rem;
  margin: 2rem 0 0.75rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.prose {
  max-width: min(900px, var(--max));
  margin-left: auto;
  margin-right: auto;
  padding-bottom: calc(var(--section-space-tight) + 0.25rem);
}

.prose p,
.prose li {
  color: var(--text);
}

.prose > p {
  margin: 0 auto 1.2rem;
  max-width: var(--prose-max);
  line-height: var(--copy-leading);
  font-size: var(--copy-size);
}

.prose > p:last-child {
  margin-bottom: 0;
}

.prose--left h3.block-title {
  text-align: left;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 1rem 0 2rem;
  -webkit-overflow-scrolling: touch;
}

table.casino-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.casino-table th,
table.casino-table td {
  border: 1px solid var(--border);
  padding: 0.65rem 0.75rem;
  text-align: center;
  vertical-align: middle;
}

table.casino-table thead th {
  background: #f4f4f5;
  font-weight: 700;
}

table.casino-table tbody th {
  font-weight: 600;
}

.btn-learn {
  display: inline-block;
  background: var(--purple);
  color: #fff !important;
  padding: 0.5rem 1.05rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.btn-learn:hover {
  background: var(--purple-dark);
  text-decoration: none;
}

.stars {
  color: var(--gold);
  letter-spacing: 1px;
  font-size: 1.1rem;
  line-height: 1;
}

.stars .half {
  opacity: 0.5;
}

/* Types section */
.types-intro {
  text-align: center;
  max-width: var(--prose-max);
  margin: 0 auto 1.35rem;
  line-height: var(--copy-leading);
  color: var(--text);
  font-size: var(--copy-size);
}

ol.numbered-sections {
  padding-left: 1.5rem;
  padding-right: 0.25rem;
  max-width: min(900px, var(--max));
  margin: 0 auto 2rem;
}

ol.numbered-sections li {
  margin-bottom: 1.35rem;
  padding-left: 0.35rem;
  line-height: var(--copy-leading);
  font-size: var(--copy-size);
}

ol.numbered-sections li:last-child {
  margin-bottom: 0;
}

ol.numbered-sections strong {
  color: var(--purple-dark);
  font-weight: 700;
}

.types-outro {
  max-width: var(--prose-max);
  margin: 0 auto;
  line-height: var(--copy-leading);
  font-size: var(--copy-size);
  text-align: center;
  color: var(--text);
}

/* Bonuses block */
.bonuses-block {
  max-width: min(900px, var(--max));
  margin: 0 auto;
  padding: calc(var(--section-space-tight) + 0.25rem) 0 calc(var(--section-space) + 0.25rem);
  border-top: 1px solid var(--border);
}

.bonuses-block h2.section-title {
  margin-top: 0;
  margin-bottom: var(--heading-to-body);
}

.bonuses-block > p {
  max-width: var(--prose-max);
  margin-left: auto;
  margin-right: auto;
  line-height: var(--copy-leading);
  font-size: var(--copy-size);
  margin-bottom: 1.2rem;
}

.bonuses-block > p:last-of-type {
  margin-bottom: 1.35rem;
}

.bonuses-block ul {
  margin: 0;
  padding: 0.15rem 0 0.25rem 1.5rem;
  max-width: var(--prose-max);
  margin-left: auto;
  margin-right: auto;
}

.bonuses-block li {
  margin-bottom: 0.7rem;
  line-height: var(--copy-leading);
  font-size: var(--copy-size);
  padding-left: 0.2rem;
  color: var(--text);
}

.bonuses-block li:last-child {
  margin-bottom: 0;
}

.newsletter-form label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
  opacity: 0.9;
}

.newsletter-form input[type="email"] {
  width: 100%;
  max-width: 280px;
  padding: 0.55rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font: inherit;
  margin-bottom: 0.75rem;
}

.newsletter-form button {
  background: var(--yellow-btn);
  color: #222;
  font-weight: 700;
  padding: 0.55rem 1.25rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}

.newsletter-form button:hover {
  filter: brightness(1.05);
}

/* Two columns */
.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.35rem, 3.25vw, 1.85rem);
  padding: calc(var(--section-space) + 0.15rem) 0 calc(var(--section-space) + 0.15rem);
  max-width: var(--max);
  margin: 0 auto;
}

@media (max-width: 768px) {
  .two-cols {
    grid-template-columns: 1fr;
    padding: var(--section-space-tight) 0 var(--section-space);
    gap: 1.35rem;
  }
}

.two-cols .col {
  padding: clamp(1.45rem, 3.25vw, 1.85rem) clamp(1.25rem, 3vw, 1.65rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.two-cols h3 {
  color: var(--purple-dark);
  font-size: clamp(1.05rem, 2.05vw, 1.125rem);
  margin: 0 0 1rem;
  text-align: center;
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.38;
}

.two-cols .col p {
  margin: 0 0 1.1rem;
  line-height: var(--copy-leading);
  font-size: var(--copy-size);
  color: var(--text);
}

.two-cols .col p:last-child {
  margin-bottom: 0;
}

/* Popular games */
.popular-games {
  padding: 0 0 calc(var(--section-space) + 0.35rem);
  border-top: 1px solid var(--border);
  margin-top: 0;
}

.popular-games .section-title {
  margin-top: calc(var(--section-space) + 0.15rem);
  margin-bottom: calc(var(--heading-to-body) + 0.15rem);
}

.popular-games p {
  margin: 0 auto;
  max-width: var(--prose-max);
  line-height: var(--copy-leading);
  font-size: var(--copy-size);
  padding: 1.05rem 0 1.2rem;
  border-bottom: 1px solid var(--border);
}

.popular-games p:first-of-type {
  padding-top: 0.15rem;
}

.popular-games p:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.popular-games p strong a,
.popular-games p strong {
  color: var(--purple-dark);
}

.popular-games p strong a {
  text-decoration: none;
}

.popular-games p strong a:hover {
  text-decoration: underline;
}

/* FAQ */
.faq-wrap {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 0 calc(var(--section-space) + 0.35rem);
}

.faq-wrap .section-title {
  margin-bottom: calc(var(--heading-to-body) + 0.15rem);
}

.faq-box {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.faq-box details {
  border-bottom: 1px solid var(--border);
}

.faq-box details:last-child {
  border-bottom: none;
}

.faq-box summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 1.1rem 1.2rem 1.1rem 1.2rem;
  font-weight: 600;
  font-size: var(--copy-size);
  line-height: 1.5;
  user-select: none;
  color: var(--text);
  transition: background 0.15s ease;
}

.faq-box summary:hover {
  background: rgba(74, 21, 75, 0.04);
}

.faq-box summary::-webkit-details-marker {
  display: none;
}

.faq-box summary::before {
  content: "+";
  flex: 0 0 1.35rem;
  width: 1.35rem;
  text-align: center;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--purple);
  line-height: 1.45;
  margin-top: 0.06em;
}

.faq-box details[open] summary {
  background: rgba(74, 21, 75, 0.035);
}

.faq-box details[open] summary::before {
  content: "−";
}

.faq-box .faq-answer {
  padding: 0.2rem 1.2rem 1.2rem calc(1.2rem + 1.35rem + 0.65rem);
  color: var(--muted);
  font-weight: 400;
  font-size: 0.96875rem;
  line-height: var(--copy-leading);
}

/* Email capture — premium dark card */
.email-capture {
  padding: clamp(3.1rem, 7.25vw, 4.35rem) 0 clamp(3.25rem, 7.5vw, 4.5rem);
  background: linear-gradient(180deg, #ebe8ef 0%, #f0eef3 50%, #ebe8ef 100%);
  border-top: 1px solid var(--border);
}

.email-capture__wrap {
  display: flex;
  justify-content: center;
}

.email-capture__box {
  width: 100%;
  max-width: 28.75rem;
  margin: 0 auto;
  padding: clamp(2.35rem, 5.5vw, 3rem) clamp(1.65rem, 4.25vw, 2.25rem);
  text-align: center;
  background: linear-gradient(168deg, #1a1620 0%, #0e0c12 52%, #09080c 100%);
  border: 1px solid rgba(201, 162, 39, 0.26);
  border-radius: 1.25rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 2px 4px rgba(0, 0, 0, 0.14),
    0 12px 28px rgba(0, 0, 0, 0.18),
    0 32px 72px -16px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(0, 0, 0, 0.25);
}

.email-capture__title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.022em;
  color: #fff;
}

.email-capture__subtitle {
  margin: 0 auto 1.625rem;
  max-width: 22rem;
  font-size: 0.9375rem;
  line-height: 1.62;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
}

.email-capture__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: stretch;
}

.email-capture__input {
  flex: 1 1 12rem;
  min-width: 0;
  min-height: 3rem;
  padding: 0.65rem 1.125rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.625rem;
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.4;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

/* Wins over generic .newsletter-form input rules (max-width / margin) */
.email-capture__form.newsletter-form input[type="email"].email-capture__input {
  max-width: none;
  margin-bottom: 0;
  width: auto;
}

.email-capture__input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.email-capture__input:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.09);
}

.email-capture__input:focus {
  outline: none;
  border-color: rgba(201, 162, 39, 0.5);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.12),
    0 0 0 3px rgba(201, 162, 39, 0.2);
  background: rgba(255, 255, 255, 0.09);
}

.email-capture__submit {
  flex: 0 0 auto;
  min-height: 3rem;
  padding: 0.65rem 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 0.625rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.032em;
  line-height: 1.25;
  color: #1a0f08;
  cursor: pointer;
  background: linear-gradient(180deg, #f4e2a8 0%, #d4af37 46%, #b8941f 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.38) inset,
    0 2px 4px rgba(0, 0, 0, 0.12),
    0 8px 28px rgba(201, 162, 39, 0.3);
  transition:
    filter 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.email-capture__form.newsletter-form .email-capture__submit {
  margin-bottom: 0;
}

.email-capture__submit:hover {
  filter: brightness(1.04);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.42) inset,
    0 3px 8px rgba(0, 0, 0, 0.14),
    0 12px 36px rgba(201, 162, 39, 0.38);
  transform: translateY(-1px);
}

.email-capture__submit:focus {
  outline: none;
}

.email-capture__submit:focus-visible {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.9),
    0 0 0 5px rgba(201, 162, 39, 0.45);
}

@media (max-width: 520px) {
  .email-capture__box {
    padding: clamp(1.85rem, 4.75vw, 2.45rem) clamp(1.25rem, 4.25vw, 1.65rem);
    border-radius: 1.125rem;
  }

  .email-capture__title {
    margin-bottom: 0.5rem;
  }

  .email-capture__subtitle {
    margin-bottom: 1.35rem;
  }

  .email-capture__form {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.7rem;
  }

  /* Column flex: flex-basis applies to height — avoid huge "textarea" field */
  .email-capture__input,
  .email-capture__form.newsletter-form input[type="email"].email-capture__input {
    flex: 0 0 auto;
    width: 100%;
    height: 3rem;
    min-height: 3rem;
    padding: 0 1.1rem;
    font-size: 1rem;
    line-height: 1.35;
    box-sizing: border-box;
    border-radius: 0.625rem;
  }

  .email-capture__submit,
  .email-capture__form.newsletter-form .email-capture__submit {
    width: 100%;
    flex: 0 0 auto;
    height: 3rem;
    min-height: 3rem;
    padding: 0 1.35rem;
    line-height: 1.25;
    box-sizing: border-box;
    border-radius: 0.625rem;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: clamp(1.75rem, 4vw, 2.25rem) clamp(1.125rem, 4vw, 1.5rem) 2.5rem;
  margin-top: 0;
  background: var(--surface-elevated);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.35rem 1.75rem;
  max-width: var(--max);
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-brand .brand-logo--footer {
  width: 40px;
  height: auto;
  opacity: 0.94;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.footer-links a {
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-links a.footer-link--th {
  color: var(--purple);
}

.footer-links a.footer-link--en {
  color: #b45309;
}

/* Legal disclaimer pages */
.page-legal .nav-main {
  gap: 0.65rem 1rem;
}

.nav-legal-sibling {
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--purple);
  line-height: 1.3;
  max-width: 14rem;
}

@media (min-width: 640px) {
  .nav-legal-sibling {
    font-size: 0.875rem;
    max-width: none;
  }
}

.nav-legal-sibling:hover {
  text-decoration: underline;
}

.legal-main {
  padding: 2.25rem 0 3rem;
  min-height: 50vh;
}

.legal-doc {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.legal-doc-header {
  margin-bottom: 2.5rem;
  padding-bottom: 0.25rem;
}

.legal-doc-title {
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.legal-doc-updated {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.legal-doc-intro {
  margin: 0;
  line-height: 1.65;
  color: var(--text);
}

.legal-section {
  margin-bottom: 2.5rem;
}

.legal-section:last-of-type {
  margin-bottom: 0;
}

.legal-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.65rem;
  line-height: 1.4;
}

.legal-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 0 1.15rem;
}

.legal-section p {
  margin: 0 0 1rem;
  line-height: 1.65;
  color: var(--text);
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-contact-line {
  margin-top: 0.25rem;
}

.legal-section a[href^="mailto:"],
.legal-contact-line a {
  color: #1d4ed8;
  font-weight: 600;
}

.legal-section a[href^="mailto:"]:hover,
.legal-contact-line a:hover {
  text-decoration: underline;
}

/* Scroll to top */
.scroll-top {
  position: fixed;
  right: clamp(0.75rem, 3vw, 1.15rem);
  bottom: clamp(0.75rem, 3vw, 1.15rem);
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, var(--purple) 0%, var(--purple-dark) 100%);
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  box-shadow: var(--shadow-md), 0 4px 20px rgba(74, 21, 75, 0.25);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: linear-gradient(145deg, var(--purple-light) 0%, var(--purple) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 8px 28px rgba(74, 21, 75, 0.3);
}

.scroll-top:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px var(--surface-elevated),
    0 0 0 5px rgba(90, 31, 90, 0.45);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
