/* บริษัท ทรัพย์อนาวิล จำกัด — สไตล์ชีตหลัก
   แนวคิด: ร้านกาแฟริมทะเลแสนสุข
   รอยแก้วกาแฟเป็นวงบนกระดาษ กระดานเมนูสีเข้มที่มีเส้นจุดนำสายตา
   เมล็ดกาแฟสามเมล็ดใต้หัวข้อ และภาพแบนเนอร์ในวงแก้วพร้อมจานรอง
   สี: ทรายครีม เอสเปรสโซ ครีมากาแฟ และเขียวน้ำทะเล */

:root {
  --sand: #f6eee2;
  --white: #fffdf9;
  --espresso: #33211a;
  --espresso-2: #4a3127;
  --crema: #c98b4f;
  --crema-text: #8a5528;
  --sea: #1e6e73;
  --sea-pale: #d7ebe9;
  --ink: #2a1c16;
  --muted: #65554c;
  --rule: #e3d6c3;
  --foam: #efe2d0;

  --display: "Chonburi", "Noto Serif Thai", "Leelawadee UI", Tahoma, serif;
  --body: "Noto Sans Thai Looped", "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;

  --s--1: 0.9rem;
  --s-0: 1.02rem;
  --s-1: 1.2rem;
  --s-2: 1.5rem;
  --s-3: 1.85rem;
  --s-4: 2.25rem;
  --s-5: 2.8rem;

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --wrap: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sand); color: var(--ink); font-family: var(--body); font-size: var(--s-0); line-height: 1.8; }
img { display: block; max-width: 100%; height: auto; }

a { color: var(--sea); text-underline-offset: 0.2em; }
a:hover { color: var(--espresso); }
a[href^="mailto:"] { overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--sea); outline-offset: 3px; }

h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.5; margin: 0; text-wrap: balance; }
h3 { font-family: var(--body); font-weight: 700; line-height: 1.5; margin: 0; }
h1 { font-size: clamp(var(--s-3), 4vw, var(--s-5)); line-height: 1.45; }
h2 { font-size: clamp(var(--s-2), 2.8vw, var(--s-4)); }
h3 { font-size: var(--s-1); }
p { margin: 0 0 1em; max-width: 40em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
.nw { white-space: nowrap; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--espresso); color: #fff; padding: 0.6em 1em; z-index: 60; }
.skip:focus { left: 0; }

/* พื้นสำรองเมื่อภาพโหลดไม่ขึ้น */
.coffeebg { background: radial-gradient(circle at 35% 30%, #a06a43 0 18%, #6b4330 45%, #33211a 100%); }

/* รอยแก้วกาแฟ */
.ring { position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, transparent 0 84%, rgba(138,85,40,.22) 86%, rgba(138,85,40,.1) 91%, transparent 94%); }

/* เมล็ดกาแฟใต้หัวข้อ */
.beans { display: flex; gap: 0.35rem; margin-top: 0.7rem; }
.beans i { position: relative; display: block; width: 0.8rem; height: 1.1rem; border-radius: 50%; background: var(--espresso-2); transform: rotate(-25deg); }
.beans i::after { content: ""; position: absolute; left: 50%; top: 12%; bottom: 12%; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--crema); }
.beans i:nth-child(2) { transform: rotate(10deg); }
.beans i:nth-child(3) { transform: rotate(40deg); }
.band--board .beans i, .page-head .beans i { background: var(--foam); }
.band--board .beans i::after, .page-head .beans i::after { background: var(--crema-text); }

/* ---------- ส่วนหัว ---------- */
.site-head { background: var(--white); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 30; }
.site-head__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.6rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand svg { width: 2.8rem; height: 2.8rem; flex: none; }
.brand__name { display: block; font-family: var(--display); font-size: 1.2rem; line-height: 1.4; }
.brand__legal { display: block; font-size: 0.78rem; color: var(--muted); line-height: 1.3; }

.nav ul { list-style: none; display: flex; gap: 0.2rem; }
.nav a { display: block; padding: 0.35em 0.85em; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.95rem; border-radius: 999px; }
.nav a:hover { background: var(--foam); }
.nav a[aria-current="page"] { background: var(--espresso); color: #fff; }

.nav-toggle { display: none; font: inherit; font-weight: 700; cursor: pointer; background: var(--espresso); color: #fff; border: 0; border-radius: 999px; padding: 0.25em 1.1em; }
@media (max-width: 68rem) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 2px solid var(--espresso); padding: 0.6rem var(--gutter) 1rem; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0.2rem; }
  .nav a { padding: 0.55em 0.9em; }
}
@media (max-width: 34rem) { .brand__legal { display: none; } }

/* ---------- ปุ่ม ---------- */
.btn { display: inline-block; font-family: var(--body); font-weight: 700; font-size: 1.02rem; line-height: 1.4;
  padding: 0.72em 1.7em; border-radius: 999px; cursor: pointer; text-decoration: none; background: var(--sea); color: #fff; border: 2px solid var(--sea); }
.btn:hover { background: var(--espresso); border-color: var(--espresso); color: #fff; }
.btn--line { background: transparent; border-color: var(--espresso); color: var(--espresso); }
.btn--line:hover { background: var(--espresso); color: #fff; }
.band--board .btn { background: var(--crema); border-color: var(--crema); color: var(--espresso); }
.band--board .btn:hover { background: #fff; border-color: #fff; color: var(--espresso); }
.band--board .btn--line { background: transparent; border-color: var(--foam); color: #fff; }
.band--board .btn--line:hover { background: #fff; color: var(--espresso); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }

/* ---------- ภาพ ---------- */
.photo { margin: 0; }
.photo__frame { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 1.6rem; }
.photo--tall .photo__frame { aspect-ratio: 4 / 5; }
.photo--square .photo__frame { aspect-ratio: 1; }
.photo__frame img { width: 100%; height: 100%; object-fit: cover; }
.photo figcaption { font-size: 0.76rem; color: var(--muted); margin-top: 0.45rem; }
.photo figcaption a { color: inherit; }
.band--board .photo figcaption { color: var(--foam); }
img.is-missing { visibility: hidden; }

/* ---------- แบนเนอร์หน้าแรก ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(2.4rem, 6vw, 4.4rem) 0 clamp(3rem, 7vw, 5rem); }
.hero .ring--a { width: 22rem; height: 22rem; left: -7rem; bottom: -8rem; }
.hero .ring--b { width: 12rem; height: 12rem; left: 38%; top: -3rem; transform: rotate(30deg); }
.hero__grid { position: relative; display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; }
@media (max-width: 58rem) { .hero__grid { grid-template-columns: 1fr; } }
.hero__place { font-weight: 700; letter-spacing: 0.08em; color: var(--sea); margin-bottom: 0.4rem; }
.hero__lead { font-size: var(--s-1); line-height: 1.8; color: var(--muted); margin-top: 1.1rem; max-width: 31em; }
.hero__chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.6rem; }
.hero__chips li { background: var(--white); border: 1px solid var(--rule); border-radius: 999px; padding: 0.25em 0.95em; font-size: 0.94rem; }
.hero__chips a { color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.hero__chips a:hover { text-decoration: underline; }

/* แก้วและจานรอง */
.cup { position: relative; margin: 0 auto; width: min(100%, 27rem); aspect-ratio: 1; }
.cup::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--white); box-shadow: 0 1.2rem 2.2rem rgba(51,33,26,.18), inset 0 0 0 1.1rem var(--white), inset 0 0 0 1.25rem var(--rule); }
.cup__photo { position: absolute; inset: 9%; border-radius: 50%; overflow: hidden; box-shadow: inset 0 0 0 0.4rem rgba(201,139,79,.6); }
.cup__photo img { width: 100%; height: 100%; object-fit: cover; }
.cup__handle { position: absolute; right: -6%; top: 36%; width: 18%; height: 26%; border: 1.1rem solid var(--white); border-left: 0; border-radius: 0 50% 50% 0; box-shadow: 0.5rem 0.6rem 1rem rgba(51,33,26,.12); }
.cup figcaption { position: absolute; left: 0; right: 0; bottom: -1.7rem; text-align: center; font-size: 0.76rem; color: var(--muted); }
.cup figcaption a { color: inherit; }
@media (max-width: 34rem) { .cup__handle { border-width: 0.7rem; right: -4%; } }

/* ---------- แบนเนอร์หน้าใน ---------- */
.page-head { position: relative; overflow: hidden; color: #fff; background: var(--espresso); }
.page-head__media { position: absolute; inset: 0; }
.page-head__media img { width: 100%; height: 100%; object-fit: cover; }
.page-head__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(95deg, rgba(51,33,26,.95) 0%, rgba(51,33,26,.84) 50%, rgba(51,33,26,.3) 100%); }
.page-head__body { position: relative; z-index: 1; padding: clamp(2.6rem, 7vw, 4.4rem) 0; max-width: 40rem; }
.page-head__body p { font-size: var(--s-1); line-height: 1.8; margin-top: 1rem; color: var(--foam); }
.page-head__credit { position: absolute; z-index: 1; right: 0.7rem; bottom: 0.5rem; font-size: 0.72rem; line-height: 1.5; color: #fff; background: rgba(51,33,26,.75); padding: 0.1em 0.7em; border-radius: 999px; }
.page-head__credit a { color: inherit; }

/* ---------- ส่วนเนื้อหา ---------- */
.band { position: relative; overflow: hidden; padding: clamp(3rem, 7vw, 5rem) 0; }
.band--white { background: var(--white); }
.band--sea { background: var(--sea-pale); }
.band--board { color: #fff; background:
    radial-gradient(60% 50% at 20% 10%, rgba(255,255,255,.05), transparent 70%),
    radial-gradient(50% 60% at 90% 90%, rgba(255,255,255,.04), transparent 70%),
    var(--espresso); }
.band--board p { color: var(--foam); }
.band--board a { color: #fff; }
.band__head { position: relative; margin-bottom: clamp(1.8rem, 4vw, 2.6rem); max-width: 44rem; }
.band__head p { margin-top: 0.9rem; color: var(--muted); font-size: var(--s-1); line-height: 1.8; }
.band--board .band__head p { color: var(--foam); }
.lead-gap { margin-top: 1.3rem; }

.split { position: relative; display: grid; gap: clamp(1.8rem, 5vw, 4rem); grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; }
.split--top { align-items: start; }
.split--flip { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
@media (max-width: 54rem) { .split, .split--flip { grid-template-columns: 1fr; } }

/* สองรูปแบบบริการ */
.ways { display: grid; gap: clamp(1.2rem, 3vw, 2rem); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 54rem) { .ways { grid-template-columns: 1fr; } }
.way { background: var(--white); border-radius: 1.6rem; overflow: hidden; }
.way .photo__frame { border-radius: 0; aspect-ratio: 16 / 9; }
.way .photo figcaption { padding: 0 1.5rem; }
.way__body { padding: 1rem 1.6rem 1.7rem; }
.way__tag { display: inline-block; font-size: 0.85rem; font-weight: 700; color: var(--sea); background: var(--sea-pale); padding: 0.1em 0.8em; border-radius: 999px; }
.way h3 { font-family: var(--display); font-weight: 400; font-size: var(--s-2); margin-top: 0.5rem; }
.way p { margin-top: 0.4rem; color: var(--muted); }

/* กระดานเมนู */
.menu { display: grid; gap: 0.2rem 3.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 50rem) { .menu { grid-template-columns: 1fr; } }
.menu div { padding: 0.8rem 0; border-bottom: 1px dashed rgba(239,226,208,.25); }
.menu dt { display: flex; align-items: baseline; gap: 0.6rem; font-family: var(--display); font-size: 1.15rem; color: #fff; }
.menu dt::after { content: ""; flex: 1; border-bottom: 2px dotted rgba(239,226,208,.45); transform: translateY(-0.3em); }
.menu dt span { order: 2; font-family: var(--body); font-size: 0.85rem; color: var(--crema); white-space: nowrap; }
.menu dd { margin: 0.2rem 0 0; color: var(--foam); font-size: 0.97rem; }

.cards { list-style: none; display: grid; gap: 1.1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 58rem) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 36rem) { .cards { grid-template-columns: 1fr; } }
.cards li { background: var(--white); padding: 1.3rem 1.4rem 1.5rem; border-radius: 1.2rem; }
.band--white .cards li { background: var(--sand); }
.cards p { margin-top: 0.35rem; color: var(--muted); }

.flow { list-style: none; counter-reset: fl; display: grid; gap: 1.8rem 1.5rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 58rem) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 32rem) { .flow { grid-template-columns: 1fr; } }
.flow li { counter-increment: fl; }
.flow li::before { content: counter(fl); display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border-radius: 50%; background: var(--white); box-shadow: inset 0 0 0 0.35rem var(--foam), 0 0 0 1px var(--rule); font-family: var(--display); color: var(--crema-text); margin-bottom: 0.7rem; }
.flow p { margin-top: 0.3rem; color: var(--muted); }

.note { position: relative; margin-top: 1.8rem; font-size: 0.95rem; color: var(--muted); }
.band--board .note { color: #cdb9a6; }

.deflist { margin: 0; }
.deflist div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 0.3rem 1.8rem; padding: 0.95rem 0; border-top: 1px solid var(--rule); }
.deflist div:last-child { border-bottom: 1px solid var(--rule); }
.band--sea .deflist div { border-color: #b9d6d3; }
.deflist dt { font-weight: 700; font-size: 1.08rem; line-height: 1.5; }
.deflist dd { margin: 0; color: var(--muted); max-width: 40em; }
@media (max-width: 46rem) { .deflist div { grid-template-columns: 1fr; } }

.ticks { list-style: none; margin-top: 0.8rem; }
.ticks li { position: relative; padding-left: 1.6rem; margin-top: 0.45rem; max-width: 38em; }
.ticks li::before { content: ""; position: absolute; left: 0.1rem; top: 0.45em; width: 0.65rem; height: 0.9rem; border-radius: 50%; background: var(--espresso-2); transform: rotate(-25deg); }

/* ---------- รายละเอียด (หน้าสินค้าและบริการ) ---------- */
.item { padding: clamp(2.2rem, 5vw, 3.4rem) 0; border-top: 1px solid var(--rule); }
.item:first-of-type { border-top: 0; padding-top: 0; }
.item:last-of-type { padding-bottom: 0; }
.item h3 { font-family: var(--display); font-weight: 400; font-size: clamp(var(--s-2), 2.6vw, var(--s-3)); line-height: 1.5; }
.item h4 { font-family: var(--body); font-weight: 700; font-size: 1.06rem; margin: 1.3rem 0 0; }
.item p { margin-top: 0.8rem; }
.item:nth-of-type(even) .split > .photo { order: -1; }
@media (max-width: 54rem) { .item .split > .photo { order: -1; } }

/* ---------- คำถามที่พบบ่อย ---------- */
.faq { position: relative; max-width: 50rem; }
.faq details { background: var(--white); border-radius: 1rem; margin-top: 0.6rem; padding: 0 1.2rem; }
.faq summary { cursor: pointer; list-style: none; position: relative; font-weight: 700; font-size: 1.06rem; line-height: 1.55; padding: 0.9rem 2.8rem 0.9rem 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--sea-pale); color: var(--sea); font-family: Tahoma, sans-serif; font-size: 1.2rem; line-height: 1.8rem; text-align: center; }
.faq details[open] summary::after { content: "\2212"; background: var(--sea); color: #fff; }
.faq details p { padding: 0 0 1.1rem; color: var(--muted); }

/* ---------- ช่องติดต่อท้ายหน้า ---------- */
.cta { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(1.8rem, 5vw, 4rem); align-items: center; }
@media (max-width: 54rem) { .cta { grid-template-columns: 1fr; } }
.cta__card { background: var(--white); color: var(--ink); padding: 0.6rem 1.6rem; border-radius: 1.4rem; }
.cta__card div { padding: 0.8rem 0; border-top: 1px dashed var(--rule); }
.cta__card div:first-child { border-top: 0; }
.cta__card small { display: block; font-size: var(--s--1); color: var(--muted); }
.cta__card b, .band--board .cta__card a { font-weight: 700; font-size: 1.1rem; line-height: 1.6; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.band--board .cta__card a:hover { color: var(--sea); text-decoration: underline; }

/* ---------- ตารางข้อมูลบริษัท ---------- */
.spec { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--white); border-radius: 1.2rem; overflow: hidden; }
.spec th, .spec td { text-align: left; vertical-align: top; padding: 0.85em 1.2em; border-top: 1px solid var(--rule); }
.spec tr:first-child th, .spec tr:first-child td { border-top: 0; }
.spec th { width: 13rem; font-weight: 400; color: var(--muted); }
.spec td { font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 40rem) {
  .spec th, .spec td { display: block; width: auto; }
  .spec td { border-top: 0; padding-top: 0; }
}

/* ---------- หน้าเนื้อหายาว (นโยบาย) ---------- */
.prose { max-width: 46rem; }
.prose h2 { font-family: var(--body); font-weight: 700; font-size: 1.35rem; margin-top: 2.6rem; }
.prose h2:first-of-type { margin-top: 1.5rem; }
.prose p, .prose ul { margin-top: 0.9rem; }
.prose ul { padding-left: 1.4rem; }
.prose li { margin-top: 0.35rem; max-width: 38em; }
.prose .meta { color: var(--muted); font-size: 0.97rem; margin-top: 0; }

/* ---------- หน้าติดต่อ ---------- */
.contact-list { margin: 1.8rem 0 0; }
.contact-list div { padding: 1rem 0; border-top: 1px solid var(--rule); }
.contact-list div:last-child { border-bottom: 1px solid var(--rule); }
.contact-list dt { color: var(--muted); font-size: var(--s--1); }
.contact-list dd { margin: 0.1rem 0 0; font-weight: 700; font-size: var(--s-1); line-height: 1.6; overflow-wrap: anywhere; }
.contact-list dd a { text-decoration: none; }
.contact-list dd a:hover { text-decoration: underline; }
.contact-list dd small { display: block; font-weight: 400; font-size: var(--s--1); color: var(--muted); }
.contact-list .big a { font-family: var(--display); font-size: var(--s-3); line-height: 1.4; color: var(--ink); white-space: nowrap; }

.form { background: var(--white); padding: clamp(1.2rem, 3vw, 2rem); border-radius: 1.6rem; }
.form h2 { font-size: var(--s-2); }
.form > p { color: var(--muted); margin-top: 0.6rem; font-size: 0.98rem; }
.field { margin-top: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.field input, .field select, .field textarea { width: 100%; font: inherit; color: var(--ink); background: var(--sand); padding: 0.5em 0.9em; border: 1px solid #b9a796; border-radius: 0.7rem; }
.field input, .field select { height: 2.9rem; }
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--sea-pale); outline-offset: 0; border-color: var(--sea); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; align-items: end; }
@media (max-width: 34rem) { .field-row { grid-template-columns: 1fr; } }
.form .btn { margin-top: 1.4rem; }
.form__hint { font-size: var(--s--1); color: var(--muted); margin-top: 0.8rem; }

.map { background: var(--white); overflow: hidden; border-radius: 1.6rem; }
.map iframe { display: block; width: 100%; height: clamp(18rem, 45vw, 26rem); border: 0; }
.map p { padding: 0.8rem 1.2rem; font-size: 0.97rem; max-width: none; }

/* ---------- ส่วนท้าย ---------- */
.site-foot { background: var(--espresso); color: var(--foam); padding: clamp(2.5rem, 5vw, 4rem) 0 1.5rem; font-size: 0.98rem; }
.site-foot a { color: #fff; }
.site-foot a:hover { color: var(--crema); }
.site-foot__grid { display: grid; gap: 2rem 3rem; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 1.2fr); }
@media (max-width: 54rem) { .site-foot__grid { grid-template-columns: 1fr; } }
.site-foot h2 { font-family: var(--body); font-weight: 700; font-size: var(--s-1); color: #fff; margin-bottom: 0.7rem; }
.site-foot ul { list-style: none; }
.site-foot li { margin-top: 0.3rem; }
.site-foot address { font-style: normal; overflow-wrap: anywhere; }
.site-foot__base { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.15); display: flex; flex-wrap: wrap; gap: 0.4rem 2rem; justify-content: space-between; font-size: var(--s--1); color: #c2ad9a; }
.site-foot__base p { max-width: none; margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  .cup__photo img { animation: settle 1s ease-out both; }
  @keyframes settle { from { transform: scale(1.08) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .site-head { position: static; } .nav, .nav-toggle, .btn-row, .map { display: none; } }
