/*
Theme Name: Today Rich
Theme URI: https://todayrich.example
Author: Today Rich
Description: Landing page theme for the Today Rich membership service.
Version: 0.1.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: todayrich
*/

:root {
  --ink: #22160b;
  --ink-deep: #160d04;
  --gold: #d9ac4b;
  --gold-bright: #f0c96a;
  --orange: #e67e22;
  --orange-bright: #f79a3e;
  --cream: #f7f0df;
  --cream-dim: #d3c3a6;
  --hairline: rgba(230, 150, 60, 0.28);
  --font-display: "Chonburi", serif;
  --font-body: "Anuphan", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(230, 126, 34, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 40%, rgba(217, 172, 75, 0.08), transparent 55%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap {
  width: min(1080px, 92vw);
  margin-inline: auto;
}

/* Grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(22, 13, 4, 0.85);
  border-bottom: 1px solid var(--hairline);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--gold-bright);
}

.brand .baht { color: var(--cream); }

.topbar nav {
  display: flex;
  gap: 1.8rem;
  align-items: center;
  font-size: 0.95rem;
}

.topbar nav a:not(.btn):hover { color: var(--gold-bright); }

@media (max-width: 640px) {
  .topbar nav a:not(.btn) { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.75rem 1.9rem;
  border: 1px solid var(--gold);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: var(--ink-deep);
  box-shadow: 0 6px 24px rgba(217, 172, 75, 0.35);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(217, 172, 75, 0.5);
}

.btn-ghost { color: var(--gold-bright); }
.btn-ghost:hover { background: rgba(217, 172, 75, 0.1); }

.btn-lg { padding: 1.05rem 2.8rem; font-size: 1.15rem; }

/* ---------- Notices ---------- */
.notice {
  text-align: center;
  padding: 0.85rem 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--hairline);
}

.notice-success { background: #3a2410; color: var(--gold-bright); }
.notice-cancel { background: #3a2712; color: var(--cream); }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(3rem, 7vw, 5.5rem);
  position: relative;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
}

.hero-kicker {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.35rem 1.1rem;
  margin-bottom: 1.6rem;
  animation: rise 0.7s ease both;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.25;
  color: var(--cream);
  animation: rise 0.7s 0.1s ease both;
}

.hero h1 em {
  font-style: normal;
  color: var(--orange-bright);
}

.hero p.lead {
  margin-top: 1.4rem;
  font-size: 1.15rem;
  color: var(--cream-dim);
  max-width: 34rem;
  animation: rise 0.7s 0.2s ease both;
}

.hero-cta {
  margin-top: 2.4rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  animation: rise 0.7s 0.3s ease both;
}

.hero-cta small { color: var(--cream-dim); width: 100%; }

/* Price coin */
.price-coin {
  justify-self: center;
  width: clamp(220px, 26vw, 300px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.28), transparent 45%),
    linear-gradient(145deg, var(--orange-bright), var(--gold) 60%, #b8892f 90%);
  color: var(--ink-deep);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 0 0 10px rgba(22, 13, 4, 0.14),
    inset 0 0 0 12px rgba(255, 235, 180, 0.5);
  animation: float 5s ease-in-out infinite;
}

.price-coin .amount {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 7vw, 4.8rem);
  line-height: 1;
}

.price-coin .per { font-weight: 600; margin-top: 0.4rem; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

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

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--hairline);
  overflow: hidden;
  padding-block: 0.8rem;
  background: var(--ink-deep);
}

.marquee-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: scroll 28s linear infinite;
  font-family: var(--font-display);
  color: var(--gold);
  white-space: nowrap;
}

@keyframes scroll {
  to { transform: translateX(-50%); }
}

.mq-num { color: var(--gold-bright); }

/* ---------- Sections ---------- */
section.block { padding: clamp(3.5rem, 8vw, 6rem) 0; }

.section-head {
  max-width: 40rem;
  margin-bottom: 3rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  color: var(--gold-bright);
  line-height: 1.35;
}

.section-head p { color: var(--cream-dim); margin-top: 0.8rem; }

/* Benefits */
.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

@media (max-width: 860px) {
  .benefits { grid-template-columns: 1fr; }
}

.benefit {
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 2rem 1.7rem;
  background: linear-gradient(160deg, rgba(217, 172, 75, 0.06), transparent 55%);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.benefit:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.benefit .num {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: 0.15em;
}

.benefit h3 {
  font-size: 1.2rem;
  margin: 0.7rem 0 0.5rem;
  color: var(--cream);
}

.benefit p { color: var(--cream-dim); font-size: 0.98rem; }

/* Pricing */
.pricing-card {
  margin-inline: auto;
  max-width: 30rem;
  text-align: center;
  border: 1px solid var(--gold);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  background:
    radial-gradient(400px 200px at 50% 0%, rgba(217, 172, 75, 0.14), transparent 70%),
    var(--ink-deep);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.pricing-card .plan-name {
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--gold);
}

.pricing-card .price {
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 8vw, 5rem);
  color: var(--cream);
  line-height: 1.1;
  margin: 1.2rem 0 0.2rem;
}

.pricing-card .price small {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--cream-dim);
}

.pricing-card ul {
  list-style: none;
  margin: 1.8rem 0 2.2rem;
  text-align: start;
}

.pricing-card li {
  padding: 0.55rem 0 0.55rem 1.8rem;
  border-bottom: 1px dashed var(--hairline);
  position: relative;
  color: var(--cream-dim);
}

.pricing-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold-bright);
  font-weight: 700;
}

.pricing-card .secure {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--cream-dim);
}

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--hairline);
  padding: 1.1rem 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.faq summary::after {
  content: "+";
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.3rem;
  transition: transform 0.2s ease;
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p { color: var(--cream-dim); margin-top: 0.7rem; max-width: 44rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 2.5rem 0;
  background: var(--ink-deep);
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--cream-dim);
  font-size: 0.9rem;
}

/* ---------- Membership badge (header) ---------- */
.member-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-deep);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  border-radius: 999px;
  padding: 0.4rem 1rem;
}

/* ---------- Tip archive/single ---------- */
.tip-back {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--gold);
  font-size: 0.95rem;
}

.tip-back:hover { color: var(--gold-bright); }

.tip-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--gold-bright);
  line-height: 1.3;
}

.tip-date {
  color: var(--cream-dim);
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.tip-full { margin-top: 2rem; max-width: 44rem; }
.tip-full p { margin-bottom: 1rem; color: var(--cream); }

.tip-teaser {
  position: relative;
  margin-top: 2rem;
  max-width: 44rem;
  filter: blur(4px);
  opacity: 0.55;
  user-select: none;
  pointer-events: none;
}

.tip-teaser p { margin-bottom: 1rem; color: var(--cream); }

.tip-status {
  color: var(--gold);
  font-weight: 600;
  margin-top: 0.6rem;
}

.tip-status-member { color: var(--gold-bright); }

/* Tip grid */
.tip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

@media (max-width: 860px) {
  .tip-grid { grid-template-columns: 1fr; }
}

.tip-card {
  position: relative;
  display: block;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 2rem 1.7rem;
  background: linear-gradient(160deg, rgba(217, 172, 75, 0.06), transparent 55%);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.tip-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.tip-badge {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  font-size: 1.1rem;
}

.tip-card-date {
  display: block;
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.tip-card-title {
  margin-top: 0.6rem;
  font-size: 1.1rem;
  color: var(--cream);
  padding-right: 2rem;
}

/* Paywall */
.paywall {
  margin: 2.5rem 0;
  max-width: 34rem;
  text-align: center;
  border: 1px solid var(--gold);
  border-radius: 24px;
  padding: 2.6rem 2rem;
  background:
    radial-gradient(400px 200px at 50% 0%, rgba(217, 172, 75, 0.14), transparent 70%),
    var(--ink-deep);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.paywall-lock {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold-bright);
}

.paywall p { color: var(--cream-dim); margin-top: 0.8rem; }

.paywall-cta {
  margin-top: 1.6rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.paywall-note {
  display: block;
  margin-top: 1.2rem;
  color: var(--cream-dim);
  font-size: 0.8rem;
}

/* ---------- Plans (two-tier pricing) ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
  max-width: 46rem;
  margin-inline: auto;
}

@media (max-width: 860px) {
  .plans { grid-template-columns: 1fr; }
}

.plan {
  position: relative;
  text-align: center;
  border: 1px solid var(--gold);
  border-radius: 24px;
  padding: 2.6rem 2rem;
  background:
    radial-gradient(400px 200px at 50% 0%, rgba(217, 172, 75, 0.14), transparent 70%),
    var(--ink-deep);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
}

.plan .plan-name {
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--gold);
}

.plan .price {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  color: var(--cream);
  line-height: 1.1;
  margin: 1rem 0 0.2rem;
}

.plan .price small {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--cream-dim);
}

.plan ul {
  list-style: none;
  margin: 1.6rem 0 1.8rem;
  text-align: start;
}

.plan li {
  padding: 0.5rem 0 0.5rem 1.8rem;
  border-bottom: 1px dashed var(--hairline);
  position: relative;
  color: var(--cream-dim);
}

.plan .btn { margin-top: auto; }
.plan .btn-ghost { margin-top: 0.8rem; }

.plan-featured {
  border: 2px solid var(--orange-bright);
  box-shadow: 0 30px 90px rgba(230, 126, 34, 0.3), 0 0 0 1px rgba(247, 154, 62, 0.25) inset;
}

.tier-badge {
  position: absolute;
  top: -0.9rem;
  right: 1.6rem;
  background: linear-gradient(135deg, var(--orange-bright), var(--orange));
  color: var(--ink-deep);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(230, 126, 34, 0.4);
}

/* ---------- Tip numbers (member view) ---------- */
.tip-numbers {
  margin-top: 2rem;
  max-width: 34rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.tip-num-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--hairline);
}

.tip-num-row .label {
  color: var(--cream-dim);
  font-size: 0.95rem;
}

.tip-num-row .value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold-bright);
}

.tip-num-row.tip-reason .value {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--cream);
  text-align: right;
}

.locked-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--hairline);
  color: var(--cream-dim);
  font-size: 0.9rem;
}

.locked-line .btn {
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
}

.tip-disclaimer {
  margin-top: 1.6rem;
  color: var(--cream-dim);
  font-size: 0.8rem;
  max-width: 34rem;
}

/* ---------- Language switcher ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-switch a {
  color: var(--cream-dim);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.lang-switch a:hover { color: var(--gold-bright); }

.lang-switch a.is-active {
  color: var(--gold-bright);
  font-weight: 700;
}

.lang-switch a:first-child::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--hairline);
}

@media (max-width: 640px) {
  .lang-switch { display: inline-flex; }
}

/* ---------- Account / billing page ---------- */
.acct-card {
  border: 1px solid var(--gold);
  border-radius: 24px;
  padding: 2.4rem 2.2rem;
  background:
    radial-gradient(400px 200px at 0% 0%, rgba(217, 172, 75, 0.14), transparent 70%),
    var(--ink-deep);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  text-align: left;
  margin-bottom: 1.6rem;
}

.acct-card h2,
.acct-card h3 {
  font-family: var(--font-display);
  color: var(--gold-bright);
  font-size: 1.3rem;
  margin-bottom: 1.2rem;
}

.acct-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.6rem;
  margin-bottom: 0.4rem;
}

.acct-head .price {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--cream);
}

.acct-head .price small {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--cream-dim);
}

.acct-meta {
  color: var(--cream-dim);
  font-size: 0.92rem;
  margin-top: 0.4rem;
}

.acct-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2.4rem;
}

@media (max-width: 640px) {
  .acct-grid { grid-template-columns: 1fr; }
}

.acct-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px dashed var(--hairline);
}

.acct-row .label { color: var(--cream-dim); font-size: 0.92rem; }
.acct-row .value { color: var(--gold-bright); font-weight: 600; text-align: right; }

.acct-access-list {
  list-style: none;
  margin: 0.5rem 0 1.6rem;
}

.acct-access-list li {
  padding: 0.55rem 0 0.55rem 1.8rem;
  border-bottom: 1px dashed var(--hairline);
  position: relative;
  color: var(--cream-dim);
}

.acct-access-list li.is-unlocked::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold-bright);
  font-weight: 700;
}

.acct-access-list li.is-locked::before {
  content: "🔒";
  position: absolute;
  left: 0;
  font-size: 0.85rem;
}

.acct-table-wrap { overflow-x: auto; }

.acct-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.92rem;
}

.acct-table th {
  text-align: left;
  color: var(--gold);
  font-weight: 600;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}

.acct-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--hairline);
  color: var(--cream);
  white-space: nowrap;
}

.acct-table th:last-child,
.acct-table td:last-child,
.acct-table th.is-amount,
.acct-table td.is-amount {
  text-align: right;
}

.acct-table a { color: var(--gold-bright); }

.acct-demo-note {
  border: 1px solid var(--orange);
  background: rgba(230, 126, 34, 0.1);
  color: var(--cream);
  border-radius: 14px;
  padding: 0.85rem 1.2rem;
  font-size: 0.88rem;
  margin-bottom: 1.6rem;
}

.acct-notice {
  border-radius: 14px;
  padding: 0.85rem 1.2rem;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 1.6rem;
}

.acct-notice-success {
  border: 1px solid var(--gold);
  background: rgba(217, 172, 75, 0.14);
  color: var(--gold-bright);
}

.acct-notice-error {
  border: 1px solid var(--orange);
  background: rgba(230, 126, 34, 0.14);
  color: var(--cream);
}

.acct-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
}

.tg-invite {
  word-break: break-all;
  color: var(--gold-bright);
}
