/* =========================================
   Bitcoin Chiang Mai — Thai-inspired theme
   Palette :
   - Rouge Thaï  : #C8102E
   - Or temple   : #D4A017 / #F4C430
   - Crème       : #FFF8E7
   - Brun teck   : #4A2C1A
   - Orange BTC  : #F7931A
   ========================================= */

:root {
  --thai-red: #C8102E;
  --thai-red-dark: #8B0A1F;
  --thai-gold: #D4A017;
  --thai-gold-light: #F4C430;
  --cream: #FFF8E7;
  --cream-dark: #F5E6C8;
  --teak: #4A2C1A;
  --teak-soft: #6B4423;
  --btc-orange: #F7931A;
  --ink: #2B1810;

  --font-display: 'Prata', 'Kanit', serif;
  --font-body: 'Kanit', 'Mitr', system-ui, sans-serif;
  --font-thai: 'Mitr', 'Kanit', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== Thai decorative borders (motif lai thai) ===== */
.thai-border {
  height: 14px;
  background:
    repeating-linear-gradient(90deg,
      var(--thai-gold) 0,
      var(--thai-gold) 14px,
      var(--thai-red) 14px,
      var(--thai-red) 28px),
    var(--thai-gold);
  position: relative;
}
.thai-border::before,
.thai-border::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  background: var(--teak);
}
.thai-border::before { top: 0; }
.thai-border::after { bottom: 0; }
.thai-border--top { box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.thai-border--bottom { box-shadow: 0 -4px 12px rgba(0,0,0,0.15); }

/* ===== Layout helpers ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: 720px; }

.section {
  padding: 96px 0;
  position: relative;
}
.section--cream { background: var(--cream); }
.section--gold {
  background:
    radial-gradient(circle at 20% 20%, rgba(244,196,48,0.45), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(212,160,23,0.4), transparent 50%),
    linear-gradient(135deg, #FFF1C2 0%, #F4C430 100%);
}
.section--temple {
  background:
    linear-gradient(rgba(74,44,26,0.85), rgba(43,24,16,0.92)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'><path fill='none' stroke='%23D4A017' stroke-width='1.2' opacity='0.6' d='M40 5 L55 20 L70 20 L70 35 L55 35 L55 50 L70 50 L70 65 L55 65 L40 80 L25 65 L10 65 L10 50 L25 50 L25 35 L10 35 L10 20 L25 20 Z'/></svg>");
  background-size: cover, 120px 120px;
  color: var(--cream);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-thai);
  color: var(--thai-red);
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 500;
}
.section--temple .eyebrow { color: var(--thai-gold-light); }
.section--gold .eyebrow { color: var(--thai-red-dark); }

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  color: var(--teak);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 24px;
}
.section__title--light { color: var(--cream); }
.section__intro {
  font-size: 1.15rem;
  max-width: 700px;
  margin-bottom: 56px;
  color: var(--teak-soft);
}
.section--temple .section__intro { color: var(--cream-dark); }

/* ===== Hero ===== */
.hero {
  background:
    radial-gradient(ellipse at top right, rgba(247,147,26,0.25), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(212,160,23,0.35), transparent 55%),
    linear-gradient(135deg, #FFE8C7 0%, #FCD9A3 45%, #F4C430 100%);
  position: relative;
  padding-bottom: 80px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(200,16,46,0.15), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--teak);
}
.logo__symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--btc-orange), var(--thai-red));
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-family: var(--font-body);
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(200,16,46,0.3);
}
.logo__text em { font-style: italic; color: var(--thai-red); }

.nav__links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav__links a {
  color: var(--teak);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--thai-red); }
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--thai-red);
  transition: width 0.3s;
}
.nav__links a:hover::after { width: 100%; }

.hero__content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 0;
  text-align: center;
  position: relative;
  z-index: 2;
}
.hero__greeting {
  font-family: var(--font-thai);
  color: var(--thai-red);
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  margin-bottom: 24px;
  font-weight: 500;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  line-height: 1.05;
  color: var(--teak);
  margin-bottom: 24px;
  font-weight: 400;
}
.hero__title .accent {
  color: var(--btc-orange);
  font-style: italic;
  text-shadow: 2px 2px 0 rgba(200,16,46,0.15);
}
.hero__title .accent-gold {
  color: var(--thai-red);
  font-style: italic;
}
.hero__subtitle {
  font-size: 1.2rem;
  max-width: 640px;
  margin: 0 auto 40px;
  color: var(--teak-soft);
}

/* Lotus decoration */
.hero__deco {
  margin: 60px auto 0;
  display: flex;
  justify-content: center;
}
.lotus {
  position: relative;
  width: 140px; height: 140px;
}
.lotus span {
  position: absolute;
  top: 50%; left: 50%;
  width: 40px; height: 70px;
  background: linear-gradient(to top, var(--thai-red), var(--btc-orange));
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  transform-origin: 50% 100%;
  margin-left: -20px;
  margin-top: -70px;
  opacity: 0.9;
  box-shadow: inset 0 -10px 15px rgba(0,0,0,0.1);
}
.lotus span:nth-child(1) { transform: rotate(0deg); }
.lotus span:nth-child(2) { transform: rotate(45deg); }
.lotus span:nth-child(3) { transform: rotate(90deg); }
.lotus span:nth-child(4) { transform: rotate(135deg); }
.lotus span:nth-child(5) { transform: rotate(180deg); }
.lotus span:nth-child(6) { transform: rotate(225deg); }
.lotus span:nth-child(7) { transform: rotate(270deg); }
.lotus span:nth-child(8) { transform: rotate(315deg); }
.lotus__center {
  position: absolute;
  top: 50%; left: 50%;
  width: 50px; height: 50px;
  margin: -25px 0 0 -25px;
  background: var(--thai-gold);
  color: var(--teak);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  z-index: 3;
  box-shadow: 0 0 0 4px var(--cream), 0 6px 18px rgba(0,0,0,0.25);
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 16px 36px;
  border: none;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.04em;
}
.btn--primary {
  background: linear-gradient(135deg, var(--thai-red), var(--thai-red-dark));
  color: #fff;
  box-shadow: 0 6px 20px rgba(200,16,46,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
  border: 2px solid var(--thai-gold);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(200,16,46,0.45), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn--full { width: 100%; }

/* ===== Cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}
.card {
  background: #fff;
  padding: 36px 28px;
  border-radius: 18px;
  text-align: center;
  border-top: 4px solid var(--thai-gold);
  box-shadow: 0 6px 24px rgba(74,44,26,0.08);
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(74,44,26,0.18);
}
.card::before {
  content: '';
  position: absolute;
  top: -4px; left: 50%;
  width: 60px; height: 4px;
  background: var(--thai-red);
  transform: translateX(-50%);
}
.card__icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
}
.card h3 {
  font-family: var(--font-display);
  color: var(--thai-red);
  font-size: 1.5rem;
  margin-bottom: 12px;
  font-weight: 400;
}
.card p {
  color: var(--teak-soft);
  font-size: 0.98rem;
}

/* ===== Why grid ===== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 24px;
}
@media (max-width: 640px) {
  .why-grid { grid-template-columns: 1fr; }
}
.why-item {
  padding: 24px;
  border-left: 3px solid var(--thai-gold);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(6px);
  border-radius: 0 12px 12px 0;
}
.why-item__num {
  display: inline-block;
  font-family: var(--font-thai);
  font-size: 2.4rem;
  color: var(--thai-gold-light);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}
.why-item h3 {
  font-family: var(--font-display);
  color: var(--cream);
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 8px;
}
.why-item p {
  color: var(--cream-dark);
  font-size: 0.98rem;
}

/* ===== Form ===== */
.form {
  background: #fff;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(74,44,26,0.18);
  border: 2px solid var(--thai-gold);
  margin-top: 16px;
}
.form__row { margin-bottom: 22px; }
.form label {
  display: block;
  font-weight: 500;
  color: var(--teak);
  margin-bottom: 8px;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #E5D5B0;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--thai-red);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(200,16,46,0.12);
}
.form textarea { resize: vertical; }
.form__note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--teak-soft);
  margin-top: 18px;
  font-style: italic;
}

.form__status {
  text-align: center;
  font-size: 0.95rem;
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 500;
  line-height: 1.5;
}
.form__status--ok {
  background: rgba(35, 134, 54, 0.12);
  color: #1a7431;
  border: 1px solid rgba(35, 134, 54, 0.3);
}
.form__status--err {
  background: rgba(200, 16, 46, 0.1);
  color: #a00d24;
  border: 1px solid rgba(200, 16, 46, 0.3);
}

/* ===== Footer ===== */
.footer {
  background: var(--teak);
  color: var(--cream);
  padding: 60px 0 40px;
  text-align: center;
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.footer__tagline {
  font-family: var(--font-thai);
  color: var(--thai-gold-light);
  font-size: 1.05rem;
  margin-bottom: 24px;
  line-height: 1.8;
}
.footer__copy {
  font-size: 0.85rem;
  color: rgba(255,248,231,0.6);
  letter-spacing: 0.05em;
}

/* ===== Responsive ===== */
@media (max-width: 720px) {
  .nav { padding: 18px 20px; }
  .nav__links { display: none; }
  .section { padding: 64px 0; }
  .form { padding: 28px 22px; }
  .hero__content { padding-top: 30px; }
}
