:root {
  color-scheme: light;
  --ink: #1d2522;
  --muted: #68716d;
  --paper: #f8f7f2;
  --surface: #ffffff;
  --line: #d9ddd4;
  --forest: #244c3e;
  --forest-soft: #e4eee9;
  --gold: #b98a2f;
  --rose: #7e3f48;
  --blue: #1f5c72;
  --shadow: 0 24px 70px rgba(29, 37, 34, 0.14);
  font-family: Inter, "Noto Sans Thai", "Noto Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(248, 247, 242, 0.92);
  border-bottom: 1px solid rgba(36, 76, 62, 0.14);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--forest);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  white-space: nowrap;
}

.nav a {
  padding: 9px 12px;
  border-radius: 999px;
  color: #31423b;
}

.nav a:hover,
.nav a:focus-visible {
  background: var(--forest-soft);
  outline: none;
}

.nav .nav-action {
  background: var(--ink);
  color: white;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  min-height: clamp(640px, calc(100vh - 150px), 820px);
  border-bottom: 1px solid var(--line);
}

.hero-media {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #dfe5dd;
}

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(29, 37, 34, 0.12), rgba(248, 247, 242, 0.1));
  pointer-events: none;
}

.media-caption {
  position: absolute;
  left: clamp(16px, 3vw, 34px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 1;
  max-width: min(420px, calc(100% - 32px));
  margin: 0;
  padding: 8px 11px;
  background: rgba(255, 251, 243, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  color: #34443d;
  font-size: 13px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 7vw, 88px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--rose);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(56px, 9vw, 128px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.24;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  color: #425049;
  font-size: clamp(18px, 2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
}

.button.primary {
  background: var(--forest);
  border-color: var(--forest);
  color: white;
}

.button.secondary,
.footer-button {
  background: transparent;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.trust-strip div {
  padding: 22px clamp(18px, 4vw, 48px);
  background: var(--surface);
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip span {
  color: var(--muted);
  font-size: 14px;
}

.section {
  padding: clamp(58px, 8vw, 108px) clamp(18px, 4vw, 56px);
}

.section-heading {
  max-width: 820px;
  margin-bottom: 34px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
}

.legend-board {
  background: var(--paper);
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.legend-card {
  display: flex;
  flex-direction: column;
  min-height: 310px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.legend-card.active {
  border-color: rgba(185, 138, 47, 0.55);
  box-shadow: var(--shadow);
}

.legend-card h3 {
  font-size: clamp(28px, 3vw, 42px);
}

.legend-card p {
  color: var(--muted);
}

.legend-card .text-link {
  margin-top: auto;
}

.featured-article {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.05fr);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.article-image {
  min-height: 480px;
  background: #d7dfd8;
}

.article-copy {
  padding: clamp(26px, 5vw, 56px);
}

.article-meta {
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--forest);
  font-weight: 900;
}

.text-link::after {
  content: "→";
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.article-grid article {
  padding: 24px;
  background: var(--forest-soft);
  border: 1px solid rgba(36, 76, 62, 0.18);
  border-radius: 8px;
}

.notes-board {
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.note-grid article {
  min-height: 190px;
  padding: 24px;
  background: var(--paper);
}

.note-grid strong {
  display: block;
  margin-bottom: 12px;
  color: var(--forest);
  font-size: 20px;
}

.note-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.collection {
  background: #eef2ef;
  border-block: 1px solid var(--line);
}

.quiet-collection {
  padding-block: clamp(28px, 4vw, 48px);
  background: #f4f5f0;
}

.quiet-collection .section-heading {
  max-width: 700px;
  margin-bottom: 12px;
}

.quiet-collection h2 {
  font-size: clamp(22px, 2.4vw, 34px);
}

.quiet-collection p {
  color: #70776f;
  font-size: 15px;
}

.collection-note {
  max-width: 760px;
  margin: 0;
}

.subtle-link {
  margin-left: 8px;
  color: #57645e;
  font-weight: 800;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-image {
  aspect-ratio: 4 / 5;
  background: #dce2dc;
}

.product-copy {
  padding: 20px;
}

.status {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f3e6c9;
  color: #694d18;
  font-size: 12px;
  font-weight: 900;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.7fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
}

.about-copy {
  max-width: 760px;
}

.detail-photo {
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.detail-photo img {
  aspect-ratio: 4 / 3;
}

figcaption {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(18px, 4vw, 56px);
  background: var(--ink);
  color: white;
}

.site-footer p {
  max-width: 760px;
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer .button {
  border-color: rgba(255, 255, 255, 0.55);
  color: white;
}

.item-page {
  background: var(--paper);
}

.item-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1fr);
  min-height: clamp(560px, calc(100vh - 170px), 760px);
  border-bottom: 1px solid var(--line);
}

.item-hero-image {
  background: #dce2dc;
}

.item-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(30px, 6vw, 76px);
}

.item-hero-copy h1 {
  font-size: clamp(42px, 6vw, 84px);
}

.item-details {
  background: var(--surface);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.gallery-grid img {
  aspect-ratio: 4 / 5;
}

.hub-hero .hero-copy h1 {
  font-size: clamp(64px, 10vw, 132px);
}

.house-board {
  background: var(--paper);
}

.origin-story {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: clamp(20px, 5vw, 70px);
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.compact-heading {
  margin-bottom: 0;
}

.origin-copy {
  max-width: 900px;
  color: #34443d;
  font-size: clamp(20px, 2.3vw, 28px);
  line-height: 1.75;
}

.origin-copy p {
  margin: 0 0 1em;
}

.origin-copy p:last-child {
  margin-bottom: 0;
}

.house-grid,
.door-grid,
.path-grid {
  display: grid;
  gap: 18px;
}

.house-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.door-grid,
.path-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.house-card,
.door-grid article,
.path-grid article {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.house-card {
  display: flex;
  flex-direction: column;
  min-height: 360px;
}

.house-card.primary-house {
  border-color: rgba(185, 138, 47, 0.58);
  box-shadow: var(--shadow);
}

.house-card h3 {
  font-size: clamp(28px, 3vw, 44px);
}

.house-card p,
.door-grid p,
.path-grid p {
  color: var(--muted);
}

.house-card .text-link {
  margin-top: auto;
}

.doorway-section {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.reading-guide {
  background: #fbf7ed;
}

.principle-panel {
  background: var(--forest-soft);
  border-block: 1px solid rgba(36, 76, 62, 0.16);
}

.door-grid strong,
.path-grid strong {
  display: block;
  margin-bottom: 10px;
  color: var(--forest);
  font-size: 22px;
}

.memory-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--forest-soft);
  border-block: 1px solid rgba(36, 76, 62, 0.16);
}

.memory-panel > div {
  max-width: 860px;
}

.house-page {
  background: var(--paper);
}

.house-hero .item-hero-image img {
  object-position: center;
}

.house-landing {
  min-height: clamp(520px, calc(100vh - 170px), 760px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(52px, 8vw, 110px) clamp(18px, 4vw, 64px);
  background:
    linear-gradient(110deg, rgba(248, 247, 242, 0.95), rgba(228, 238, 233, 0.86)),
    url("./assets/hero-focus-watermarked.png") center / cover;
  border-bottom: 1px solid var(--line);
}

.house-landing.buddha-era {
  background:
    linear-gradient(110deg, rgba(248, 247, 242, 0.96), rgba(243, 230, 201, 0.76)),
    url("./assets/article-part1-seawater-watermarked.png") center / cover;
}

.house-landing.board-landing {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(248, 247, 242, 0.86), rgba(228, 238, 233, 0.62)),
    url("./assets/hero-focus-watermarked.png") center 44% / cover;
}

.board-hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 44%;
  opacity: 0.34;
}

.board-landing > :not(.board-hero-image) {
  position: relative;
  z-index: 1;
}

.house-landing.contact-landing {
  background:
    linear-gradient(110deg, rgba(248, 247, 242, 0.97), rgba(245, 239, 222, 0.82)),
    url("./assets/hero-focus-watermarked.png") center / cover;
}

.house-landing h1 {
  max-width: 980px;
  font-size: clamp(52px, 8vw, 112px);
}

.house-landing .lead {
  max-width: 820px;
}

.community-preview {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.community-grid,
.rule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.community-card,
.rule-grid article {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  padding: 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.community-card .text-link {
  margin-top: auto;
}

.forum-category-list {
  display: grid;
  gap: 14px;
}

.forum-category-list article {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.forum-category-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  aspect-ratio: 1;
  background: var(--forest);
  color: #fff;
  border-radius: 999px;
  font-weight: 900;
}

.forum-category-list h3 {
  margin-bottom: 8px;
  font-size: clamp(26px, 3.4vw, 44px);
}

.forum-rules {
  background: var(--forest-soft);
}

.board-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.board-status > div {
  display: grid;
  gap: 8px;
  padding: 22px clamp(18px, 3vw, 34px);
  background: var(--paper);
}

.board-status strong,
.topic-stat strong {
  color: var(--forest);
  font-size: 15px;
}

.board-status span,
.topic-stat span {
  color: var(--muted);
  line-height: 1.6;
}

.board-shell {
  background: var(--paper);
}

.topic-list {
  display: grid;
  gap: 14px;
}

.topic-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(150px, 0.24fr);
  gap: 20px;
  align-items: start;
  padding: clamp(18px, 3vw, 28px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(36, 76, 62, 0.06);
}

.topic-row.pinned {
  border-color: rgba(180, 132, 54, 0.45);
  background: #fffdf7;
}

.topic-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  aspect-ratio: 1;
  background: var(--forest);
  color: #fff;
  border-radius: 999px;
  font-weight: 900;
}

.topic-row.pinned .topic-icon {
  background: var(--gold);
  color: #2c2417;
}

.topic-main h3 {
  margin: 4px 0 8px;
  font-size: clamp(25px, 3vw, 39px);
  line-height: 1.18;
}

.topic-main h3 a {
  color: var(--forest);
  text-decoration: none;
}

.topic-main h3 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.topic-main p:last-child {
  margin-bottom: 0;
}

.topic-stat {
  display: grid;
  gap: 4px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.topic-page {
  background: var(--paper);
}

.topic-article {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(52px, 8vw, 104px) clamp(18px, 4vw, 56px);
}

.topic-article h1 {
  max-width: 900px;
  margin: 10px 0 18px;
  font-size: clamp(46px, 6vw, 86px);
  line-height: 1.05;
}

.topic-body {
  margin-top: clamp(34px, 6vw, 64px);
  padding-top: clamp(26px, 5vw, 48px);
  border-top: 1px solid var(--line);
  color: #303b36;
  font-size: clamp(18px, 2vw, 21px);
}

.topic-body h2 {
  margin: 1.5em 0 0.45em;
  font-size: clamp(30px, 4vw, 48px);
}

.topic-body ul {
  display: grid;
  gap: 10px;
  padding-left: 22px;
}

.topic-body li {
  padding-left: 4px;
}

.contact-preview {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.75fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}

.inbox-flow {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.inbox-flow span {
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--forest);
  font-weight: 900;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 13px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #1d2b26;
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.blog-page {
  background: var(--paper);
}

.blog-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: clamp(24px, 5vw, 70px);
  padding: clamp(44px, 7vw, 96px) clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}

.blog-hero-copy {
  max-width: 860px;
}

.blog-hero-copy h1 {
  font-size: clamp(42px, 6vw, 88px);
}

.blog-hero-image {
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.blog-hero-image img {
  aspect-ratio: 4 / 5;
  object-position: center;
}

.article-body {
  max-width: 840px;
  margin: 0 auto;
  padding: clamp(42px, 7vw, 90px) clamp(18px, 4vw, 56px);
  color: #303b36;
  font-size: clamp(18px, 2vw, 21px);
}

.article-body p {
  margin-bottom: 1.2em;
}

.stanza {
  padding-left: 18px;
  border-left: 4px solid var(--gold);
  color: #2e463c;
  font-weight: 700;
}

.article-note {
  margin: clamp(30px, 5vw, 50px) 0;
  padding: 22px;
  background: var(--forest-soft);
  border: 1px solid rgba(36, 76, 62, 0.18);
  border-radius: 8px;
}

.article-note p {
  margin: 8px 0 0;
}

.article-byline {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.tag-list span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--forest);
  font-size: 14px;
  font-weight: 800;
}

.article-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.article-next > div:first-child {
  max-width: 820px;
}

.article-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 900px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    white-space: normal;
  }

  .nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    text-align: center;
  }

  .nav .nav-action {
    grid-column: 1 / -1;
  }

  .hero,
  .featured-article,
  .item-hero,
  .blog-hero,
  .about {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .hero-media {
    min-height: 360px;
  }

	  .product-grid,
	  .legend-grid,
	  .note-grid,
	  .origin-story,
	  .house-grid,
  .door-grid,
  .path-grid,
  .community-grid,
  .rule-grid,
  .board-status,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .article-grid,
  .trust-strip {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-next {
    align-items: flex-start;
    flex-direction: column;
  }

  .memory-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .forum-category-list article {
    grid-template-columns: 1fr;
  }

  .topic-row {
    grid-template-columns: 1fr;
  }

  .topic-stat {
    display: inline-grid;
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .hero-copy {
    padding: 30px 18px 42px;
  }

  h1 {
    font-size: 50px;
  }

  .button {
    width: 100%;
  }

  .section {
    padding-inline: 16px;
  }
}
