/* ===========================================================
   American Mahjong Guide — shared stylesheet
   Aesthetic: warm editorial / tile-house. Cream paper,
   jade green, dragon red, ink charcoal. Fraunces + Karla.
   =========================================================== */

:root {
  --paper:      #f7f2e7;
  --paper-deep: #efe7d4;
  --card:       #fffdf8;
  --ink:        #2a2620;
  --ink-soft:   #5b5246;
  --ink-faint:  #8a8170;
  --jade:       #1f6b53;
  --jade-deep:  #134736;
  --jade-soft:  #e3efe8;
  --red:        #b23a30;
  --red-deep:   #7e261f;
  --gold:       #c79a3e;
  --line:       #e2d8c2;
  --line-soft:  #ece3d0;
  --radius:     14px;
  --radius-sm:  8px;
  --maxw:       1120px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Karla", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--jade); text-decoration: none; }
a:hover { color: var(--jade-deep); text-decoration: underline; text-underline-offset: 3px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 242, 231, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 34px; height: 42px;
  background: var(--card);
  border: 1.5px solid var(--jade);
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--red);
  box-shadow: 2px 2px 0 var(--jade-soft);
  flex-shrink: 0;
}
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a {
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--jade); text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  padding: 84px 0 64px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 50% at 85% 0%, rgba(31,107,83,0.06), transparent 70%),
    var(--paper);
}
.hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--red);
  margin: 0 0 18px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 5.5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  color: var(--ink);
}
.hero h1 em { font-style: italic; color: var(--jade); }
.hero p.lede {
  font-size: 20px;
  color: var(--ink-soft);
  margin: 0 0 32px;
  max-width: 30em;
}
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body);
  font-size: 16px; font-weight: 600;
  padding: 13px 26px;
  border-radius: 100px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary { background: var(--jade); color: #fff; border: 1.5px solid var(--jade); }
.btn-primary:hover { background: var(--jade-deep); color: #fff; text-decoration: none; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--jade); color: var(--jade); text-decoration: none; }

/* tile cluster illustration */
.tile-cluster {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  transform: rotate(-3deg);
}
.tile {
  aspect-ratio: 3/4;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 0 var(--paper-deep), 0 8px 16px rgba(42,38,32,0.07);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  color: var(--jade);
  position: relative;
}
.tile.red { color: var(--red); }
.tile.gold { color: var(--gold); }
.tile small {
  position: absolute; bottom: 8px; right: 9px;
  font-family: var(--font-body); font-size: 10px; font-weight: 700;
  color: var(--ink-faint); letter-spacing: 0.05em;
}

/* ---------- Section heads ---------- */
.section { padding: 72px 0; }
.section-head { margin-bottom: 40px; }
.section-head .eyebrow { margin-bottom: 12px; }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.5vw, 38px);
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
.section-head p { color: var(--ink-soft); font-size: 18px; margin: 12px 0 0; max-width: 44em; }

.alt-bg { background: var(--paper-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Article cards grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.acard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.acard:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(42,38,32,0.10); border-color: var(--jade); text-decoration: none; }
.acard-muted:hover { transform: none; box-shadow: none; border-color: var(--line); }
.acard-top {
  height: 130px;
  background: var(--jade-soft);
  display: grid; place-items: center;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.acard-top .glyph { font-family: var(--font-display); font-size: 56px; color: var(--jade); opacity: 0.55; }
.acard-top.red { background: #f6e7e3; }
.acard-top.red .glyph { color: var(--red); }
.acard-top.gold { background: #f6efdc; }
.acard-top.gold .glyph { color: var(--gold); }
.acard-body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.acard .kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 8px; }
.acard h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 22px; line-height: 1.2; margin: 0 0 10px; color: var(--ink);
}
.acard p { font-size: 15px; color: var(--ink-soft); margin: 0; line-height: 1.6; flex: 1; }
.acard .read { margin-top: 16px; font-size: 14px; font-weight: 700; color: var(--jade); letter-spacing: 0.02em; }

/* ---------- Feature / steps ---------- */
.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.feature .num {
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  color: #fff; background: var(--jade);
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 16px;
}
.feature h3 { font-family: var(--font-display); font-weight: 600; font-size: 21px; margin: 0 0 8px; }
.feature p { font-size: 16px; color: var(--ink-soft); margin: 0; }

/* ---------- Newsletter ---------- */
.cta {
  background: var(--jade-deep);
  color: #f3ecdd;
  border-radius: 20px;
  padding: 52px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta h2 { font-family: var(--font-display); font-weight: 600; font-size: 34px; margin: 0 0 12px; color: #fff; }
.cta p { color: #cfe0d6; font-size: 18px; margin: 0 auto 28px; max-width: 34em; }
.cta-form { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; }
.cta-form input {
  flex: 1; padding: 14px 18px; border-radius: 100px; border: none;
  font-family: var(--font-body); font-size: 16px; color: var(--ink); background: #fff;
}
.cta-form button {
  padding: 14px 26px; border-radius: 100px; border: none; cursor: pointer;
  background: var(--gold); color: var(--ink); font-family: var(--font-body);
  font-weight: 700; font-size: 16px;
}
.cta-form button:hover { background: #d8ab4d; }
.cta small { display: block; margin-top: 14px; color: #9fbcad; font-size: 13px; }

/* ---------- Article page ---------- */
.article-hero {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--line);
}
.breadcrumb { font-size: 14px; color: var(--ink-faint); margin: 0 0 20px; }
.breadcrumb a { color: var(--ink-soft); }
.article-hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(34px, 5vw, 50px); line-height: 1.08;
  letter-spacing: -0.02em; margin: 0 0 18px; max-width: 16em;
}
.article-meta { display: flex; gap: 18px; align-items: center; font-size: 15px; color: var(--ink-faint); }
.article-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-faint); }

.article-body { padding: 48px 0 24px; font-size: 19px; }
.article-body h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 30px; letter-spacing: -0.01em; margin: 48px 0 16px;
  padding-top: 8px; color: var(--ink);
}
.article-body h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 23px; margin: 32px 0 12px; color: var(--ink);
}
.article-body p { margin: 0 0 20px; color: var(--ink); }
.article-body ul, .article-body ol { margin: 0 0 22px; padding-left: 26px; }
.article-body li { margin-bottom: 10px; color: var(--ink); }
.article-body strong { color: var(--ink); font-weight: 700; }

.toc {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--jade);
  border-radius: var(--radius-sm);
  padding: 22px 26px;
  margin: 0 0 40px;
}
.toc h4 { font-family: var(--font-body); font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 12px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 7px; font-size: 16px; }

.callout {
  background: var(--jade-soft);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 0 0 28px;
  font-size: 17px;
}
.callout.tip { background: #f6efdc; }
.callout.note { background: #f6e7e3; }
.callout .label { font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--jade-deep); display: block; margin-bottom: 6px; }
.callout.tip .label { color: #8a6a1c; }
.callout.note .label { color: var(--red-deep); }

/* affiliate / product box */
.product-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin: 0 0 28px;
  display: flex;
  gap: 22px;
  align-items: center;
}
.product-box .pthumb {
  width: 92px; height: 92px; flex-shrink: 0;
  background: var(--jade-soft); border-radius: var(--radius-sm);
  display: grid; place-items: center; font-family: var(--font-display);
  font-size: 40px; color: var(--jade);
}
.product-box h4 { font-family: var(--font-display); font-size: 20px; margin: 0 0 4px; }
.product-box p { font-size: 15px; color: var(--ink-soft); margin: 0 0 10px; }
.product-box .btn { padding: 9px 20px; font-size: 14px; }
.fine-print {
  font-size: 14px;
  color: var(--ink-faint);
  text-align: center;
  margin: 0;
}

/* comparison table */
.cmp-table { width: 100%; border-collapse: collapse; margin: 0 0 28px; font-size: 16px; background: var(--card); border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.cmp-table th { background: var(--jade); color: #fff; text-align: left; padding: 12px 16px; font-weight: 600; font-size: 14px; letter-spacing: 0.02em; }
.cmp-table td { padding: 12px 16px; border-top: 1px solid var(--line-soft); color: var(--ink); }
.cmp-table tr:nth-child(even) td { background: var(--paper); }

.ad-slot {
  background: repeating-linear-gradient(45deg, var(--paper-deep), var(--paper-deep) 10px, var(--paper) 10px, var(--paper) 20px);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 28px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 32px 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #cfc7b6;
  padding: 56px 0 28px;
  margin-top: 80px;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand { font-family: var(--font-display); font-weight: 600; font-size: 22px; color: #fff; margin: 0 0 12px; }
.footer-grid p { font-size: 15px; color: #a89f8d; margin: 0; max-width: 28em; }
.footer-col h5 { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #8a8170; margin: 0 0 14px; }
.footer-col a { display: block; color: #cfc7b6; font-size: 15px; margin-bottom: 9px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #3d382f; padding-top: 22px; font-size: 13px; color: #8a8170; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .tile-cluster { max-width: 320px; }
  .feature-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .cta { padding: 38px 24px; }
  .cta-form { flex-direction: column; }
  .product-box { flex-direction: column; text-align: center; }
}
