/* havefundigitalhouse.com content pages (site/build_site.py). Thai first:
   Sarabun for reading, Mitr for headings, generous line height. */
:root {
  --bg: #fbf6ef;
  --card: #ffffff;
  --ink: #2a2421;
  --ink-soft: #66594f;
  --line: #ecdfd0;
  --accent: #e07a2f;
  --accent-ink: #a9520f;
  --accent-tint: #fdebd9;
  --mint: #2f8f7a;
  --mint-tint: #e1f3ee;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 6px 18px rgba(60, 40, 20, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.75 "Sarabun", system-ui, -apple-system, "Segoe UI", sans-serif;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-underline-offset: 3px; overflow-wrap: anywhere; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: "Mitr", "Sarabun", sans-serif; font-weight: 500; line-height: 1.35; color: var(--ink); }
h1 { font-size: clamp(1.7rem, 4.6vw, 2.4rem); margin: .2em 0 .4em; }
h2 { font-size: clamp(1.3rem, 3.4vw, 1.6rem); margin: 1.8em 0 .5em; }
h3 { font-size: 1.15rem; margin: 1.4em 0 .4em; }
p { margin: 0 0 1em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 9; }
.skip:focus { left: 8px; }

/* header */
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: "Mitr", sans-serif; font-size: 1.1rem; }
.brand b { font-weight: 500; color: var(--accent-ink); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink-soft); padding: 6px 12px; border-radius: 999px; font-size: .98rem; }
.nav a:hover { background: var(--accent-tint); color: var(--accent-ink); }
.nav a[aria-current="page"] { background: var(--accent-tint); color: var(--accent-ink); font-weight: 600; }
@media (max-width: 720px) {
  .top-in { padding-top: 10px; padding-bottom: 6px; gap: 6px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 6px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: 6px 10px; }
}

/* breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 14px 0 0; margin: 0; font-size: .9rem; color: var(--ink-soft); }
.crumbs li + li::before { content: "›"; margin-right: 4px; color: #b8a99b; }
.crumbs a { color: var(--ink-soft); }

/* reading pages */
.prose { padding-top: 8px; padding-bottom: 32px; }
.prose .lead { font-size: 1.12rem; color: var(--ink-soft); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin: .25em 0; }
.prose blockquote { margin: 1.2em 0; padding: 14px 18px; background: var(--accent-tint); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; }
.prose blockquote p:last-child { margin-bottom: 0; }
.byline { color: var(--ink-soft); font-size: .92rem; margin-top: -.3em; }
.note { background: var(--mint-tint); border-radius: var(--radius); padding: 14px 18px; margin: 1.2em 0; }
.note p:last-child { margin-bottom: 0; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 16px 0; }
.cards.apps { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
a.card:hover { transform: translateY(-2px); color: var(--ink); box-shadow: 0 2px 4px rgba(60, 40, 20, .08), 0 10px 24px rgba(60, 40, 20, .10); }
.card h3 { margin: 0 0 .35em; font-size: 1.08rem; }
.card p { margin: 0 0 .5em; color: var(--ink-soft); font-size: .97rem; line-height: 1.65; }
.card .meta { font-size: .85rem; color: #9a8b7e; }
.related { border-top: 1px solid var(--line); margin-top: 8px; padding-bottom: 40px; }
.related h2 { margin-top: 1.2em; }
.more { text-align: right; }

/* buttons */
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; font-family: "Mitr", sans-serif; font-weight: 500; text-decoration: none; line-height: 1.3; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 3px 0 var(--accent-ink); }
.btn-primary:hover { background: #ea8a40; color: #fff; }
.btn-ghost { background: var(--card); color: var(--accent-ink); border: 1.5px solid var(--line); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0 8px; }

/* home and product pages */
.hero { padding: 40px 0 28px; }
.hero h1 { font-size: clamp(1.9rem, 5.4vw, 2.9rem); max-width: 16em; }
.hero .lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 40em; }
.section { padding: 8px 0 28px; }
.section > h2 { margin-top: .8em; }
.feature { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
@media (min-width: 820px) { .feature { grid-template-columns: 1.15fr 1fr; padding: 30px 34px; } }
.feature h2 { margin-top: 0; }
.feature-art { display: flex; justify-content: center; }
.app-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.app-head img { border-radius: 22%; box-shadow: var(--shadow); }
.app-badge { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; font-family: "Mitr", sans-serif; font-size: 1.15rem; color: #fff; flex: none; }
.badge-denduang { background: #c9822b; }
.badge-1care { background: #2f8f7a; }
.badge-luvluv { background: var(--accent); }
.grid-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 18px 0; }
.grid-features .card { padding: 18px; }
.grid-features img { width: 72px; height: 72px; display: block; margin-bottom: 6px; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { position: relative; padding: 2px 0 10px 52px; }
.steps > li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 2px; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-ink); font-family: "Mitr", sans-serif; display: flex; align-items: center; justify-content: center; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin: 18px 0; }
.shots figure { margin: 0; }
.shots img { border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); display: block; }
.shots figcaption { font-size: .9rem; color: var(--ink-soft); text-align: center; margin-top: 6px; }
.store-links { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 4px; }

/* FAQ */
details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin: 10px 0; padding: 0 18px; box-shadow: var(--shadow); }
summary { cursor: pointer; padding: 14px 34px 14px 0; position: relative; list-style: none; font-family: "Mitr", sans-serif; font-weight: 400; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; line-height: 1; color: var(--accent-ink); }
details[open] > summary::after { content: "−"; }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
details > p:last-child, details > ul:last-child { margin-bottom: 14px; }

/* contact */
.contact-list { list-style: none; padding: 0; }
.contact-list li { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.contact-list b { display: inline-block; min-width: 7.5em; font-weight: 600; }

/* footer */
.foot { background: #2f2925; color: #e9dfd5; margin-top: 24px; padding: 28px 0 18px; font-size: .95rem; }
.foot a { color: #ffcf9f; }
.foot-in { display: grid; gap: 18px; }
@media (min-width: 820px) { .foot-in { grid-template-columns: 1.4fr 1fr; } }
.foot-name { font-family: "Mitr", sans-serif; color: #fff; margin-bottom: .4em; }
.foot-name span { font-family: "Sarabun", sans-serif; color: #cbbdb0; font-size: .9rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-content: start; }
.copy { color: #a99a8c; font-size: .85rem; margin-top: 14px; }
