/* Paper & Forms — 2026 redesign */

/* Self-hosted Prompt & Sarabun (SIL Open Font License), Thai + Latin subsets */
@font-face {
  font-family: "Prompt"; font-style: normal; font-weight: 500; font-display: optional;
  src: url("fonts/prompt-500-thai.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "Prompt"; font-style: normal; font-weight: 500; font-display: optional;
  src: url("fonts/prompt-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Prompt"; font-style: normal; font-weight: 600; font-display: optional;
  src: url("fonts/prompt-600-thai.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "Prompt"; font-style: normal; font-weight: 600; font-display: optional;
  src: url("fonts/prompt-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Sarabun"; font-style: normal; font-weight: 400; font-display: optional;
  src: url("fonts/sarabun-400-thai.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "Sarabun"; font-style: normal; font-weight: 400; font-display: optional;
  src: url("fonts/sarabun-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Sarabun"; font-style: normal; font-weight: 600; font-display: optional;
  src: url("fonts/sarabun-600-thai.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "Sarabun"; font-style: normal; font-weight: 600; font-display: optional;
  src: url("fonts/sarabun-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --paper: #faf6ee;
  --paper-2: #f3ecdf;
  --card: #ffffff;
  --ink: #2a2521;
  --ink-soft: #5c544c;
  --line: #e4dccd;
  --red: #c8201a;
  --red-dark: #a11914;
  --green: #2f8f2a;
  --blue: #0062a5;
  --line-green: #06c755;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(42, 37, 33, .06), 0 8px 24px rgba(42, 37, 33, .08);
  --max: 1160px;
  --font-head: "Prompt", system-ui, sans-serif;
  --font-body: "Sarabun", system-ui, sans-serif;
}

/* Cross-fade between pages instead of flashing blank (supporting browsers) */
@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.3; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* Torn paper edges, recoloured from the original site's strips */
.section-alt, .cta-band, .site-footer, .page-head { position: relative; }
.section-alt::before, .section-alt::after, .cta-band::before, .site-footer::before, .page-head::after {
  content: ""; position: absolute; left: 0; right: 0; height: 32px;
  background-repeat: repeat-x; pointer-events: none; z-index: 1;
}
.section-alt::before { top: -31px; background-image: url("../img/v2/torn-top-alt.webp"); background-position: left bottom; }
.section-alt::after { bottom: -31px; background-image: url("../img/v2/torn-bottom-alt.webp"); background-position: left top; }
.section-alt:has(+ .cta-band)::after { display: none; }
.cta-band::before { top: -31px; background-image: url("../img/v2/torn-top-red.webp"); background-position: left bottom; }
.site-footer::before { top: -31px; background-image: url("../img/v2/torn-top-dark.webp"); background-position: left bottom; }
.page-head::after { bottom: -1px; height: 37px; background-image: url("../img/v2/torn-top-paper.webp"); background-position: left bottom; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .7em 1.3em; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-head); font-weight: 500; font-size: 1rem;
  text-decoration: none; cursor: pointer; transition: transform .15s, background-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-line { background: var(--line-green); color: #fff; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 88px; }
.brand-text { font-family: var(--font-head); font-size: .95rem; line-height: 1.25; }
.brand-text small { display: block; color: var(--ink-soft); font-size: .78rem; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a {
  display: block; padding: .5em .9em; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-family: var(--font-head); font-size: .98rem;
}
.main-nav a:hover { background: var(--paper-2); }
.main-nav a[aria-current="page"] { color: var(--red); background: #fdecea; }
.header-cta { display: flex; gap: 8px; }
.header-cta .btn { padding: .5em 1em; font-size: .92rem; }
.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px; cursor: pointer; color: var(--ink);
}
.nav-toggle svg { width: 24px; height: 24px; display: block; }

@media (max-width: 960px) {
  .header-cta { display: none; }
}
@media (max-width: 760px) {
  .brand img { width: 64px; }
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); margin: 0; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 8px 16px 16px; }
  .main-nav a { padding: .8em .6em; }
}

/* Hero */
.hero { padding: 56px 0 64px; background: linear-gradient(180deg, #fff 0%, var(--paper) 100%); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.hero-grid > *, .split > *, .product-block > *, .footer-grid > * { min-width: 0; }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-size: .9rem; font-weight: 500;
  color: var(--green); background: #e8f4e6; padding: .3em .9em; border-radius: 999px; margin-bottom: 16px;
}
.hero h1 span { color: var(--red); }
.hero .lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 28px 0 0; padding: 0; list-style: none; font-size: .95rem; color: var(--ink-soft); }
.hero-badges li::before { content: "✓"; color: var(--green); font-weight: 700; margin-right: .4em; }
.hero-visual { position: relative; }
.hero-visual img { margin-left: auto; filter: drop-shadow(0 18px 30px rgba(42, 37, 33, .15)); }
@media (max-width: 860px) {
  .hero { padding: 36px 0 44px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 320px; margin: 0 auto; }
}
@media (max-width: 600px) {
  .card-media { aspect-ratio: 16 / 9; }
  .header-inner { gap: 12px; }
  .brand-text { font-size: .85rem; }
}

/* Promo banners (content from promos.json) */
.promos { padding: 8px 0 0; }
.promo-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  border-radius: var(--radius); box-shadow: var(--shadow); scrollbar-width: none;
}
.promo-track::-webkit-scrollbar { display: none; }
.promo-slide { flex: 0 0 100%; scroll-snap-align: start; min-height: 180px; }
.promo-image a, .promo-image picture, .promo-image img { display: block; width: 100%; height: 100%; }
.promo-image img { aspect-ratio: 3 / 1; object-fit: cover; }
/* Soft tinted themes: --accent drives the tag, heading and button */
.promo-text {
  --accent: var(--green); --tint: #eef6ec; --tint-2: #e1efdd;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 32px 40px; color: var(--ink);
  background: linear-gradient(120deg, var(--tint), var(--tint-2));
}
.promo-body { flex: 1 1 auto; min-width: 0; }
.promo-text h2 { margin: 0 0 .25em; font-size: clamp(1.3rem, 2.6vw, 1.8rem); color: var(--accent); }
.promo-text p { margin: 0 0 16px; color: var(--ink-soft); max-width: 38em; }
.promo-btn { background: var(--accent); color: #fff; }
.promo-btn:hover { filter: brightness(.92); }
.promo-tag { display: inline-block; font-family: var(--font-head); font-size: .8rem; color: var(--accent); background: rgba(255, 255, 255, .75); padding: .2em .8em; border-radius: 999px; margin-bottom: 8px; }
.promo-photo { flex: none; width: auto; max-width: 38%; max-height: 200px; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(42, 37, 33, .14)); }
.promo-green { --accent: var(--green); --tint: #eef6ec; --tint-2: #e1efdd; }
.promo-red { --accent: var(--red); --tint: #fdf0ee; --tint-2: #f9e1dd; }
.promo-blue { --accent: var(--blue); --tint: #edf4fa; --tint-2: #dfebf5; }
.promo-kraft { --accent: #7a5326; --tint: #f6eee1; --tint-2: #efe2cc; }
.promo-dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.promo-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: var(--line); cursor: pointer; }
.promo-dots button[aria-selected="true"] { background: var(--red); width: 24px; border-radius: 5px; }
@media (max-width: 600px) {
  .promo-text { padding: 24px 20px; flex-direction: column-reverse; align-items: stretch; gap: 12px; }
  .promo-photo { max-width: 70%; max-height: 140px; margin: 0 auto; }
  .promo-image img { aspect-ratio: 4 / 3; }
}

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: var(--paper-2); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p { color: var(--ink-soft); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
@media (max-width: 600px) { .section { padding: 52px 0; } }

/* Product cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s;
}
a.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(42,37,33,.06), 0 14px 32px rgba(42,37,33,.12); }
.card-media { background: var(--paper-2); aspect-ratio: 4 / 3; padding: 16px; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: contain; }
.card-body { padding: 18px 20px 22px; }
.card-body h3 { margin-bottom: .3em; }
.card-body p { margin: 0; color: var(--ink-soft); font-size: .97rem; }
.tag { display: inline-block; font-size: .78rem; font-family: var(--font-head); background: #fdecea; color: var(--red); padding: .15em .7em; border-radius: 999px; margin-bottom: 8px; }

/* Feature list */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature { background: var(--card); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); }
.feature .icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; }
.feature .icon svg { width: 26px; height: 26px; }
.feature p { color: var(--ink-soft); margin: 0; }
.i-red { background: #fdecea; color: var(--red); }
.i-green { background: #e8f4e6; color: var(--green); }
.i-blue { background: #e5f0f8; color: var(--blue); }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }

/* About split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: var(--radius); }
.split ul { padding-left: 1.2em; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }

/* About: animated stack of continuous-paper boxes. Static unless JS adds .play */
.box-anim { background: linear-gradient(180deg, #fff 0%, var(--paper-2) 100%); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.box-anim svg { width: 100%; height: auto; display: block; overflow: visible; }
.box-anim .bx-label { font-family: var(--font-head); font-weight: 600; font-size: 17px; fill: #4a3112; }
.box-anim .bx-size { font-family: var(--font-body); font-size: 13px; fill: #6b4a22; }
.box-anim .bx, .box-anim .feed { transform-box: fill-box; }
.box-anim.play .bx { animation: box-drop .75s cubic-bezier(.3, .7, .4, 1) both; }
.box-anim.play .bx-2 { animation-delay: .25s; }
.box-anim.play .bx-3 { animation-delay: .55s; }
.box-anim.play .feed { transform-origin: 50% 100%; animation: feed-in .9s ease-out 1.3s both; }
.box-anim.play .feed-roll { animation: feed-roll 4s linear 2.2s infinite; }
@keyframes box-drop {
  0% { transform: translateY(-260px); opacity: 0; }
  60% { transform: translateY(0); opacity: 1; }
  78% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}
@keyframes feed-in { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes feed-roll { from { transform: translateY(0); } to { transform: translateY(-64px); } }

/* Customers */
.logos { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.logos img { margin: 0 auto; }

.logo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.logo-grid li { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); height: 120px; display: grid; place-items: center; padding: 18px; }
.logo-grid img { max-width: 100%; max-height: 72px; width: auto; height: auto; object-fit: contain; }
@media (max-width: 960px) { .logo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .logo-grid { grid-template-columns: repeat(2, 1fr); } .logo-grid li { height: 100px; } }

/* CTA band */
/* Uneven padding: the torn top edge adds red above, the footer's torn edge covers red below */
.cta-band { background: var(--red); color: #fff; padding: 36px 0 76px; }
.cta-band .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2 { margin: 0 0 .2em; }
.cta-band p { margin: 0; opacity: .9; }
.cta-band .btn-ghost { border-color: #fff; color: #fff; }
.cta-band .btn-ghost:hover { background: #fff; color: var(--red); }
.cta-band .btn-white { background: #fff; color: var(--red); }

/* Page header (inner pages) */
/* Kraft texture under a light wash (--head-wash), torn white paper below */
.page-head {
  --head-wash: rgba(247, 241, 230, .6);
  background: linear-gradient(var(--head-wash), var(--head-wash)), #b89866 url("../img/v2/kraft.webp") center / auto 100% repeat;
  padding: 48px 0 68px;
}
.page-head h1 { color: var(--ink); }
.page-head p { color: var(--ink-soft); max-width: 44em; margin: 0; }
.page-head .toc a { background: rgba(255, 255, 255, .85); }
.page-head .toc a:hover { background: #fff; }
.breadcrumb { list-style: none; padding: 0; margin: 0 0 12px; display: flex; gap: 8px; font-size: .9rem; color: #2a1d10; }
.breadcrumb li + li::before { content: "›"; margin-right: 8px; }
.breadcrumb a { color: #2a1d10; }

/* Product detail blocks */
.product-block { display: grid; grid-template-columns: 320px 1fr; gap: 36px; padding: 36px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.product-block:last-child { border-bottom: 0; }
.product-block .media { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); align-self: start; position: sticky; top: 96px; }
.product-block h2 { font-size: 1.45rem; }
.product-block .desc { color: var(--ink-soft); }
@media (max-width: 860px) { .product-block { grid-template-columns: 1fr; gap: 20px; } .product-block .media { max-width: 360px; position: static; } }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.toc a { display: block; padding: .4em 1em; border-radius: 999px; background: var(--paper-2); color: var(--ink); text-decoration: none; font-size: .92rem; font-family: var(--font-head); }
.toc a:hover { background: var(--line); }

.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .97rem; }
th, td { text-align: left; padding: .6em 1em; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--ink); color: #fff; font-family: var(--font-head); font-weight: 500; }
tbody tr:nth-child(even) { background: #faf7f1; }
tbody tr:last-child td { border-bottom: 0; }
td.code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--blue); }
.matrix tbody th { background: transparent; color: var(--ink); font-family: var(--font-head); font-weight: 500; }
.matrix tbody th small { display: block; color: var(--ink-soft); font-family: var(--font-body); font-weight: 400; }
.matrix td.na { color: var(--line); }
.table-note { font-size: .88rem; color: var(--ink-soft); margin: 8px 0 0; }

/* Article / guide pages */
.prose { max-width: 800px; }
.prose h2 { margin-top: 2.2em; scroll-margin-top: 96px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose figure { margin: 28px 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.prose figure img { margin: 0 auto; }
.prose figcaption { text-align: center; color: var(--ink-soft); font-size: .92rem; margin-top: 10px; }
.prose code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--paper-2); padding: .1em .4em; border-radius: 4px; color: var(--blue); }
.prose td { white-space: normal; }
.prose .table-wrap { margin: 16px 0; }
.diagram { width: 100%; height: auto; max-width: 560px; margin: 0 auto; display: block; }
.toc-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 24px; margin-bottom: 8px; }
.toc-box ol { margin: 8px 0 0; columns: 2; column-gap: 32px; }
.toc-box li { break-inside: avoid; }
@media (max-width: 600px) { .toc-box ol { columns: 1; } }
.note { background: #fff7e0; border-left: 4px solid #e0a800; padding: 12px 16px; border-radius: 0 8px 8px 0; }
.steps li { margin-bottom: .8em; }
.faq details { background: #fff; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 18px; font-family: var(--font-head); font-weight: 500; list-style: none; position: relative; padding-right: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--red); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 18px 16px; margin: 0; color: var(--ink-soft); }
.guide-cta { margin-top: 48px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; border-top: 4px solid var(--red); }
.guide-cta h2 { margin-top: 0; }

/* E-Form page */
.page-head .eyebrow { background: rgba(255, 255, 255, .85); }
.page-head .hero-actions { margin-top: 20px; }
.head-note { font-size: .9rem; font-weight: 400 !important; margin-top: 12px !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* E-Form demo: final state is the static fallback; motion only when allowed */
.ef-demo { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 24px 24px; max-width: 900px; margin: 0 auto; }
.ef-demo svg { width: 100%; height: auto; display: block; }
.ef-demo .ef-type, .ef-demo .ef-pdf { transform-box: fill-box; }
.ef-demo .ef-type { transform-origin: 0 50%; }
.ef-demo .ef-pdf { transform-origin: 50% 50%; }
.ef-demo .ef-sign { stroke-dasharray: 1; stroke-dashoffset: 0; }
.ef-pdf-label { font-family: var(--font-head); font-weight: 600; font-size: 14px; fill: #fff; }
.ef-steps { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ef-steps li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 999px; background: var(--paper-2); font-family: var(--font-head); font-size: .95rem; }
.ef-steps span { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: var(--red); font-weight: 600; }
@media (max-width: 640px) { .ef-steps { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: no-preference) {
  .ef-demo .f1 { animation: ef-f1 8s infinite; }
  .ef-demo .f2 { animation: ef-f2 8s infinite; }
  .ef-demo .f3 { animation: ef-f3 8s infinite; }
  .ef-demo .t1 { animation: ef-t1 8s infinite; }
  .ef-demo .t2 { animation: ef-t2 8s infinite; }
  .ef-demo .ef-sign { animation: ef-sign 8s infinite; }
  .ef-demo .ef-ok { animation: ef-ok 8s infinite; }
  .ef-demo .ef-pdf { animation: ef-pdf 8s infinite; }
  .ef-steps .s1 { animation: ef-s1 8s infinite; }
  .ef-steps .s2 { animation: ef-s2 8s infinite; }
  .ef-steps .s3 { animation: ef-s3 8s infinite; }
}
@keyframes ef-f1 { 0%, 12% { opacity: 0; } 16%, 92% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes ef-f2 { 0%, 18% { opacity: 0; } 22%, 92% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes ef-f3 { 0%, 24% { opacity: 0; } 28%, 92% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes ef-t1 { 0%, 36% { transform: scaleX(0); } 44%, 92% { transform: scaleX(1); } 97%, 100% { transform: scaleX(0); } }
@keyframes ef-t2 { 0%, 46% { transform: scaleX(0); } 54%, 92% { transform: scaleX(1); } 97%, 100% { transform: scaleX(0); } }
@keyframes ef-sign { 0%, 56% { stroke-dashoffset: 1; opacity: 0; } 57% { opacity: 1; } 66%, 92% { stroke-dashoffset: 0; opacity: 1; } 96% { opacity: 0; } 100% { stroke-dashoffset: 1; opacity: 0; } }
@keyframes ef-ok { 0%, 69% { opacity: 0; } 72%, 92% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes ef-pdf { 0%, 74% { transform: scale(0); opacity: 0; } 79% { transform: scale(1.12); opacity: 1; } 82%, 92% { transform: scale(1); opacity: 1; } 97%, 100% { transform: scale(0); opacity: 0; } }
@keyframes ef-s1 { 0%, 11% { background: var(--red); color: #fff; } 12%, 100% { background: var(--paper-2); color: var(--ink); } }
@keyframes ef-s2 { 0%, 11% { background: var(--paper-2); color: var(--ink); } 12%, 33% { background: var(--red); color: #fff; } 34%, 100% { background: var(--paper-2); color: var(--ink); } }
@keyframes ef-s3 { 0%, 33% { background: var(--paper-2); color: var(--ink); } 34%, 94% { background: var(--red); color: #fff; } 95%, 100% { background: var(--paper-2); color: var(--ink); } }

.ef-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ef-feature { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: grid; grid-template-columns: 48px 1fr; column-gap: 14px; align-items: center; }
.ef-feature .icon { grid-row: span 2; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; }
.ef-feature .icon svg { width: 24px; height: 24px; }
.ef-feature h3 { margin: 0; font-size: 1.05rem; }
.ef-feature p { margin: 0; color: var(--ink-soft); font-size: .93rem; }
.ef-more { text-align: center; margin: 24px 0 0; }
@media (max-width: 860px) { .ef-features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .ef-features { grid-template-columns: 1fr; } }

/* Fade-up on scroll; JS adds .reveal-ready only when it can also add .in */
.reveal-ready { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal-ready.in { opacity: 1; transform: none; }

/* Sample forms gallery + lightbox */
.gallery-title { font-size: 1.4rem; margin: 40px 0 16px; }
.gallery-title:first-child { margin-top: 0; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.gallery-item { display: block; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; transition: transform .2s, box-shadow .2s; }
.gallery-item:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(42,37,33,.06), 0 14px 32px rgba(42,37,33,.12); }
/* Whole form visible: fit inside a fixed-shape box instead of cropping */
.gallery-item img { width: 100%; height: auto; aspect-ratio: 648 / 800; object-fit: contain; background: #fff; cursor: zoom-in; }
@media (max-width: 520px) { .gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; } .gallery-item { padding: 6px; } }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; overflow: hidden; }
.lightbox::backdrop { background: rgba(20, 16, 13, .9); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 64px 24px; box-sizing: border-box; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; background: #fff; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.lightbox figcaption { color: #fff; font-family: var(--font-head); margin-top: 14px; text-align: center; }
.lightbox button { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 30px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lightbox button:hover, .lightbox button:focus-visible { background: rgba(255,255,255,.28); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; top: 24px; left: 20px; color: rgba(255,255,255,.75); font-size: .9rem; }
@media (max-width: 600px) {
  .lightbox figure { padding: 60px 8px 16px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
}

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.contact-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.contact-card h2 { font-size: 1.3rem; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .label { min-width: 72px; color: var(--ink-soft); }
.contact-list a { font-weight: 600; }
.map { border: 0; width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; margin-top: 16px; background: var(--paper-2); }
.qr { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.qr img { width: 120px; border-radius: 8px; border: 1px solid var(--line); }

/* Footer */
.site-footer { background: #231f1c; color: #d9d2c7; padding: 56px 0 24px; font-size: .97rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.site-footer h2 { font-size: 1.05rem; color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid #3b3530; margin-top: 36px; padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: .88rem; color: #a59d91; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }

/* Floating mobile contact bar */
.mobile-bar { display: none; }
@media (max-width: 760px) {
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid var(--line);
  }
  .mobile-bar { transition: transform .2s; }
  .mobile-bar.is-hidden { transform: translateY(110%); }
  .mobile-bar .btn { justify-content: center; }
  /* Room for the bar inside the footer, so hiding the bar never leaves a blank strip */
  .site-footer { padding-bottom: calc(24px + 68px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card { transition: none; }
}
.eform-teaser { border-radius: var(--radius); box-shadow: var(--shadow); }

/* Two product photos side by side (merged Thermal + NCR product) */
.media-duo { display: flex; align-items: center; justify-content: center; gap: 8px; }
.media-duo img { flex: 1 1 0; min-width: 0; width: 50%; height: auto; max-height: 100%; object-fit: contain; }

/* Photos shot on white: let the white take the card's background colour */
img.blend { mix-blend-mode: multiply; }
