:root {
  --paper: #fffdf8;
  --paper-soft: #f6f1e7;
  --ink: #12382e;
  --ink-deep: #09271f;
  --ink-muted: #536861;
  --saffron: #e9a524;
  --saffron-deep: #c78316;
  --terracotta: #ae684f;
  --leaf: #5f7f5c;
  --line: rgba(18, 56, 46, .16);
  --content: 1180px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --space: clamp(4.5rem, 9vw, 8rem);
  --heading: "Prompt", "Noto Sans Thai", sans-serif;
  --body: "Sarabun", "Noto Sans Thai", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 1.08rem; line-height: 1.75; -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
main section[id] { scroll-margin-top: 2rem; }
.skip-link { position: fixed; top: .75rem; left: .75rem; z-index: 100; transform: translateY(-150%); padding: .65rem 1rem; background: var(--ink-deep); color: white; border-radius: .25rem; }
.skip-link:focus { transform: translateY(0); }
.shell { width: min(var(--content), calc(100% - 2 * var(--gutter))); margin-inline: auto; }

.site-header { position: relative; z-index: 30; background: rgba(255,253,248,.95); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.nav-shell { min-height: 5rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .72rem; color: var(--ink-deep); text-decoration: none; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.45rem, 2vw, 1.95rem); font-weight: 700; letter-spacing: -.04em; white-space: nowrap; }
.brand-mark { width: 2.25rem; height: 2.25rem; }
.nav-links { display: flex; align-items: center; gap: clamp(1.3rem, 2.7vw, 2.7rem); margin: 0; padding: 0; list-style: none; }
.nav-links a { position: relative; padding: .55rem 0; color: var(--ink); text-decoration: none; font-family: var(--heading); font-size: 1rem; font-weight: 600; }
.nav-links a::after { content: ""; position: absolute; right: 100%; bottom: 0; left: 0; height: 2px; background: var(--saffron); transition: right 180ms ease; }
.nav-links a:hover::after, .nav-links a:focus-visible::after { right: 0; }
.menu-button { display: none; align-items: center; justify-content: center; width: 2.8rem; height: 2.8rem; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }

.hero { min-height: min(720px, calc(100svh - 5rem)); display: grid; grid-template-columns: minmax(0, .92fr) minmax(31rem, 1.08fr); align-items: stretch; border-bottom: 1px solid var(--line); }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(4.5rem, 9vh, 7rem) var(--gutter) clamp(4rem, 8vh, 6rem) max(var(--gutter), calc((100vw - var(--content)) / 2)); }
.hero h1 { max-width: 10ch; margin: 0; color: var(--ink-deep); font-family: var(--heading); font-size: clamp(3.3rem, 6.6vw, 6.5rem); font-weight: 600; letter-spacing: -.06em; line-height: 1.04; text-wrap: balance; }
.hero h1 span { color: var(--saffron-deep); }
.hero-line { width: min(22rem, 72%); height: 2.35rem; margin: 1rem 0 1.25rem; color: var(--leaf); }
.hero-intro { max-width: 34rem; margin: 0 0 2rem; color: var(--ink-muted); font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.7; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.button { display: inline-flex; min-height: 3.5rem; align-items: center; justify-content: center; gap: .7rem; padding: .85rem 1.4rem; border: 1px solid transparent; border-radius: .7rem; background: var(--saffron); color: var(--ink-deep); font-family: var(--heading); font-size: 1rem; font-weight: 600; line-height: 1.2; text-decoration: none; box-shadow: 0 10px 30px rgba(199,131,22,.2); transition: transform 180ms ease, background 180ms ease; }
.button:hover, .button:focus-visible { transform: translateY(-2px); background: #f1b63e; }
.button svg { width: 1.2rem; height: 1.2rem; }
.text-link { color: var(--ink); font-family: var(--heading); font-size: .98rem; font-weight: 600; text-underline-offset: .32rem; }
.hero-visual { position: relative; min-height: 38rem; overflow: hidden; background: #dce2d1; }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-visual::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 10rem; background: linear-gradient(90deg, var(--paper), transparent); pointer-events: none; }

.section { padding: var(--space) 0; }
.section-heading { margin: 0; color: var(--ink-deep); font-family: var(--heading); font-size: clamp(2.35rem, 4.6vw, 4.5rem); font-weight: 600; letter-spacing: -.055em; line-height: 1.12; text-wrap: balance; }
.section-heading em { color: var(--saffron-deep); font-style: normal; }
.section-lead { max-width: 42rem; margin: 1.2rem 0 0; color: var(--ink-muted); font-size: clamp(1.12rem, 1.5vw, 1.28rem); }
.home-definition { background: var(--paper-soft); }
.definition-grid { display: grid; grid-template-columns: .72fr 1.28fr; gap: clamp(3rem, 9vw, 8rem); align-items: start; }
.definition-copy { color: var(--ink-muted); font-size: clamp(1.12rem, 1.55vw, 1.3rem); }
.definition-copy p { margin: 0 0 1.2rem; }
.principle { margin-top: 2.2rem; padding: 1.4rem 0 0 1.8rem; border-top: 1px solid var(--line); color: var(--ink); font-family: var(--heading); font-size: clamp(1.2rem, 1.8vw, 1.55rem); line-height: 1.55; }
.principle::before { content: "“"; position: absolute; margin-left: -1.8rem; color: var(--saffron); font-family: Georgia, serif; font-size: 3.4rem; line-height: .9; }

.rooms-intro { display: grid; grid-template-columns: 1fr .9fr; gap: 4rem; align-items: end; margin-bottom: 3rem; }
.rooms-intro p { margin: 0; color: var(--ink-muted); font-size: 1.18rem; }
.room-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.room-card { min-height: 22rem; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(2rem, 5vw, 4.5rem); }
.room-card.father-room { background: var(--ink-deep); color: var(--paper); }
.room-card.child-room { background: #e8ddc9; color: var(--ink-deep); }
.room-label { margin: 0 0 1rem; color: var(--saffron); font-family: var(--heading); font-size: 1rem; font-weight: 600; }
.child-room .room-label { color: var(--terracotta); }
.room-card h3 { max-width: 14ch; margin: 0 0 1rem; font-family: var(--heading); font-size: clamp(2rem, 3.6vw, 3.6rem); font-weight: 500; letter-spacing: -.045em; line-height: 1.14; }
.room-card p { max-width: 31rem; margin: 0 0 1.6rem; color: rgba(255,253,248,.75); font-size: 1.08rem; }
.child-room p { color: var(--ink-muted); }
.room-card a { align-self: flex-start; color: inherit; font-family: var(--heading); font-weight: 600; text-decoration-color: var(--saffron); text-underline-offset: .3rem; }

.family-note { padding: var(--space) 0; }
.family-note-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(3rem, 8vw, 7rem); align-items: start; }
.family-note-copy { color: var(--ink-muted); font-size: 1.18rem; }
.family-note-copy p { margin: 0 0 1.2rem; }
.family-quote { margin: 0; padding: 1.2rem 0 0 1.8rem; border-top: 1px solid var(--line); color: var(--ink); font-family: var(--heading); font-size: clamp(1.35rem, 2.2vw, 2rem); line-height: 1.5; }

.projects { background: var(--ink); color: var(--paper); }
.projects .section-heading { color: var(--paper); }
.projects .section-heading em { color: var(--saffron); }
.projects .section-lead { color: rgba(255,253,248,.72); }
.project-list { margin-top: 3.5rem; border-top: 1px solid rgba(255,253,248,.24); }
.project-row { display: grid; grid-template-columns: 5rem 1fr auto; gap: 2rem; align-items: center; padding: 1.6rem 0; border-bottom: 1px solid rgba(255,253,248,.24); }
.project-number { color: var(--saffron); font-family: Georgia, serif; font-size: 1.45rem; }
.project-row h3 { margin: 0; font-family: var(--heading); font-size: clamp(1.35rem, 2vw, 1.8rem); font-weight: 500; }
.project-row p { margin: .2rem 0 0; color: rgba(255,253,248,.68); }
.project-row a { color: var(--paper); font-family: var(--heading); font-weight: 600; text-decoration-color: var(--saffron); text-underline-offset: .3rem; white-space: nowrap; }

.closing { padding: var(--space) 0; background: var(--paper-soft); }
.closing-grid { display: grid; grid-template-columns: 1fr .9fr; gap: 4rem; align-items: end; }
.closing-copy p { max-width: 40rem; color: var(--ink-muted); font-size: 1.2rem; }
.closing-note { justify-self: end; max-width: 22rem; color: var(--ink); font-family: var(--heading); font-size: 1.25rem; line-height: 1.55; }
.site-footer { padding: 2rem 0; background: var(--paper); border-top: 1px solid var(--line); }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.footer-row p { margin: 0; color: var(--ink-muted); font-size: .95rem; }
.footer-links { display: flex; gap: 1.4rem; }
.footer-links a { color: var(--ink); font-size: .95rem; }

.article-hero { padding: clamp(4rem, 8vw, 7rem) 0; background: var(--paper-soft); }
.back-link { display: inline-block; margin-bottom: 2rem; color: var(--ink); font-family: var(--heading); font-weight: 600; text-underline-offset: .3rem; }
.article-hero-grid { display: grid; grid-template-columns: 1fr .85fr; gap: clamp(3rem, 8vw, 7rem); align-items: center; }
.article-hero h1 { max-width: 12ch; margin: 0; color: var(--ink-deep); font-family: var(--heading); font-size: clamp(3rem, 6vw, 6rem); font-weight: 600; letter-spacing: -.06em; line-height: 1.05; }
.article-hero h1 em { color: var(--saffron-deep); font-style: normal; }
.article-hero p { max-width: 40rem; color: var(--ink-muted); font-size: 1.2rem; }
.article-art { width: min(100%, 36rem); justify-self: end; aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: 0 28px 70px rgba(9,39,31,.18); }
.article-kicker { display: inline-block; margin: 0 0 1rem; color: var(--terracotta); font-family: var(--heading); font-size: .9rem; font-weight: 700; letter-spacing: .04em; }
.article-note { margin-top: 1.6rem; color: var(--ink) !important; font-family: var(--heading); font-size: 1rem !important; line-height: 1.6; }
.father-hero .article-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(8rem, 10rem); gap: clamp(2rem, 5vw, 4rem); }
.father-hero .article-art { align-self: start; width: 10rem; height: 10rem; opacity: .84; box-shadow: 0 12px 30px rgba(9,39,31,.12); }
.article-body { padding: var(--space) 0; }
.article-body-grid { display: grid; grid-template-columns: .72fr 1.28fr; gap: clamp(3rem, 9vw, 8rem); }
.article-body h2 { margin: 0 0 1.2rem; color: var(--ink-deep); font-family: var(--heading); font-size: clamp(2rem, 3.4vw, 3.2rem); letter-spacing: -.045em; line-height: 1.15; }
.article-body h3 { margin: 2.5rem 0 .5rem; color: var(--ink); font-family: var(--heading); font-size: 1.6rem; }
.article-body p { margin: 0 0 1.2rem; color: var(--ink-muted); font-size: 1.15rem; }
.work-list { margin-top: 2rem; border-top: 1px solid var(--line); }
.work-item { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.work-item h3 { margin: 0 0 .4rem; }
.work-item small { color: var(--terracotta); font-family: var(--heading); font-weight: 600; }
.work-link { display: inline-block; margin-top: .35rem; color: var(--ink); font-family: var(--heading); font-size: .98rem; font-weight: 600; text-underline-offset: .3rem; }

.detail-hero { padding: clamp(4.5rem, 9vw, 8rem) 0; border-bottom: 1px solid var(--line); }
.detail-hero-sbj { background: #e8efe7; }
.detail-hero-tuajun { background: #f3e9d6; }
.detail-hero-sadf { background: #ece8f5; }
.detail-hero-inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(12rem, .75fr); gap: clamp(3rem, 8vw, 8rem); align-items: center; }
.detail-hero h1 { max-width: 14ch; margin: 0; color: var(--ink-deep); font-family: var(--heading); font-size: clamp(3rem, 6.5vw, 6.5rem); font-weight: 600; letter-spacing: -.06em; line-height: 1.04; text-wrap: balance; }
.detail-lead { max-width: 42rem; margin: 1.5rem 0 0; color: var(--ink-muted); font-size: clamp(1.18rem, 1.8vw, 1.45rem); line-height: 1.7; }
.detail-symbol { width: min(100%, 18rem); aspect-ratio: 1; display: grid; place-items: center; justify-self: end; border: 1px solid rgba(18,56,46,.2); border-radius: 50%; color: var(--ink-deep); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 5vw, 4.5rem); font-weight: 700; letter-spacing: -.08em; background: rgba(255,253,248,.46); box-shadow: 0 24px 60px rgba(9,39,31,.1); }
.detail-logo { width: min(100%, 18rem); justify-self: end; }
.detail-logo img { display: block; width: 100%; height: auto; }
.detail-logo-tuajun { width: min(100%, 21rem); }
.detail-logo-tuajun img { filter: drop-shadow(0 24px 30px rgba(87,58,21,.16)); }
.detail-hero-tuajun .detail-symbol { color: #8a5a1c; }
.detail-hero-sadf .detail-symbol { color: #6046aa; font-family: var(--heading); font-size: clamp(1.8rem, 4vw, 3.8rem); letter-spacing: -.06em; }
.detail-section { padding: var(--space) 0; }
.detail-section-soft { background: var(--paper-soft); }
.detail-grid { display: grid; grid-template-columns: .78fr 1.22fr; gap: clamp(3rem, 9vw, 8rem); align-items: start; }
.detail-label { margin: 0 0 1rem; color: var(--terracotta); font-family: var(--heading); font-size: .95rem; font-weight: 700; letter-spacing: .04em; }
.detail-grid h2 { max-width: 16ch; margin: 0; color: var(--ink-deep); font-family: var(--heading); font-size: clamp(2rem, 3.7vw, 3.6rem); font-weight: 600; letter-spacing: -.05em; line-height: 1.15; text-wrap: balance; }
.detail-copy { max-width: 46rem; color: var(--ink-muted); font-size: clamp(1.08rem, 1.5vw, 1.25rem); }
.detail-copy p { margin: 0 0 1.25rem; }
.detail-list { display: grid; gap: 1rem; margin: 0 0 1.8rem; padding: 0; list-style: none; }
.detail-list li { position: relative; padding: 0 0 0 1.7rem; color: var(--ink); }
.detail-list li::before { content: ""; position: absolute; top: .75em; left: 0; width: .55rem; height: .55rem; border-radius: 50%; background: var(--saffron); }
.detail-note { padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--ink) !important; font-family: var(--heading); font-size: 1rem; line-height: 1.65; }
.detail-action { margin-top: .35rem; }
.detail-example { background: var(--paper-soft); }
.detail-example-figure { max-width: 28rem; margin: 0; justify-self: end; }
.detail-example-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 24px 60px rgba(9,39,31,.12); }
.detail-example-figure figcaption { margin-top: .85rem; color: var(--ink-muted); font-family: var(--heading); font-size: .95rem; line-height: 1.6; }

@media (min-width: 861px) {
  .father-zone .father-hero { padding: clamp(3.5rem, 5vw, 4.5rem) 0; }
  .father-zone .article-body,
  .father-zone .home-definition { padding: clamp(4rem, 6vw, 5.5rem) 0; }
  .father-zone .article-body-grid { gap: clamp(3rem, 5vw, 4.5rem); }
}

@media (max-width: 860px) {
  .nav-links { position: absolute; top: 5rem; right: var(--gutter); left: var(--gutter); display: none; flex-direction: column; align-items: stretch; gap: 0; padding: .75rem 1rem; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(9,39,31,.12); }
  .nav-links.is-open { display: flex; }
  .nav-links a { display: block; padding: .75rem 0; }
  .menu-button { display: inline-flex; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { padding: 4.5rem var(--gutter) 3.5rem; }
  .hero-visual { min-height: 27rem; }
  .hero-visual::after { inset: 0 0 auto; width: auto; height: 6rem; background: linear-gradient(180deg, var(--paper), transparent); }
  .definition-grid, .family-note-grid, .closing-grid, .article-hero-grid, .article-body-grid, .detail-hero-inner, .detail-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .rooms-intro { grid-template-columns: 1fr; gap: 1.3rem; }
  .article-art, .closing-note, .detail-symbol, .detail-logo { justify-self: start; }
  .detail-example-figure { justify-self: start; }
  .father-hero .article-hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .father-hero .article-art { width: 8rem; height: 8rem; }
}
@media (max-width: 620px) {
  .brand { font-size: 1.42rem; }
  .brand-mark { width: 2rem; height: 2rem; }
  .hero h1 { font-size: clamp(3.1rem, 15vw, 4.8rem); }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 1.1rem; }
  .room-grid { grid-template-columns: 1fr; }
  .room-card { min-height: 20rem; padding: 2.5rem 1.6rem; }
  .project-row { grid-template-columns: 2.5rem 1fr; gap: .75rem 1rem; }
  .project-row a { grid-column: 2; justify-self: start; }
  .footer-row { align-items: flex-start; flex-direction: column; gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

.screen-gallery { display: grid; gap: 1.5rem; margin-top: 2rem; }
.screen-gallery figure { margin: 0; }
.screen-gallery img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 1.2rem; background: var(--paper); box-shadow: 0 16px 40px rgba(9,39,31,.08); }
.screen-gallery figcaption { margin-top: .75rem; color: var(--ink); font-family: var(--heading); font-size: .95rem; line-height: 1.5; }
@media (min-width: 720px) {
  .screen-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
