/* =========================================================
   MTSC Brochures – corporate catalogue, mobile first
   ========================================================= */
:root {
    --brand: #7b2c83;
    --brand-2: #b83bb3;
    --night: #0d0b11;
    --night-2: #16121b;
    --ink: #111318;
    --ink-2: #3f4451;
    --muted: #6b7280;
    --line: #e5e7eb;
    --line-2: #eef0f3;
    --bg: #f3f4f6;
    --panel: #fff;
    --wa: #25d366;
    --r: 10px;
    --shadow: 0 1px 2px rgba(16, 18, 24, .04), 0 1px 3px rgba(16, 18, 24, .06);
    --shadow-lg: 0 2px 4px rgba(16, 18, 24, .04), 0 16px 32px -12px rgba(16, 18, 24, .22);
    --ease: cubic-bezier(.2, .8, .2, 1);
    --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: 118px; }
body {
    margin: 0; background: var(--bg); color: var(--ink);
    font: 400 15px/1.55 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-feature-settings: 'cv11', 'ss01'; -webkit-font-smoothing: antialiased; overflow-x: hidden;
    padding-bottom: calc(82px + var(--safe-b));
}
body.sheet-open, body.flip-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.ic { width: 18px; height: 18px; flex: none; }

/* ---------- Labels ---------- */
.kicker {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #c9b8d0;
}
.kicker i { width: 22px; height: 2px; background: linear-gradient(90deg, var(--brand-2), var(--brand)); }
.kicker.dark { color: var(--c1, var(--brand)); }
.kicker.dark i { background: var(--c1, var(--brand)); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent; cursor: pointer;
    font-weight: 600; font-size: 14px; letter-spacing: .005em;
    transition: transform .2s var(--ease), box-shadow .2s, background .2s, border-color .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary { color: #fff; background: linear-gradient(180deg, var(--c2, var(--brand-2)) -60%, var(--c1, var(--brand)) 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, 0 8px 20px -10px var(--c1, var(--brand)); }
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, 0 12px 26px -10px var(--c1, var(--brand)); }
.btn-line { color: #fff; border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .04); }
.btn-line:hover { background: rgba(255, 255, 255, .1); }
.btn-soft { background: #f3f4f6; border-color: var(--line); color: var(--ink); }
.btn-soft:hover { background: #eceef1; }
.btn-wa { background: var(--wa); color: #fff; }
.btn .ic { width: 16px; height: 16px; }
.btn:focus-visible, .chip:focus-visible, .bro:focus-visible, .feat:focus-visible, .toc a:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; overflow: hidden; isolation: isolate; color: #fff; background: var(--night); padding: 14px 0 34px; }
.hero-grid {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .35) 100%);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .35) 100%);
}
.hero-glow {
    position: absolute; z-index: -1; width: 720px; height: 720px; right: -260px; top: -360px; border-radius: 50%;
    background: radial-gradient(circle, rgba(184, 59, 179, .38), rgba(123, 44, 131, .12) 45%, transparent 70%);
}
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(184, 59, 179, .6), transparent); }

.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo-plate { display: inline-flex; align-items: center; padding: 6px 12px; background: #fff; border-radius: 6px; }
.logo-plate img { height: 32px; width: auto; }
.hero-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, .75); transition: color .2s; }
.hero-link:hover { color: #fff; }
.hero-link .ic { width: 14px; height: 14px; }

.hero-body { padding-top: 40px; }
h1 {
    margin: 16px 0 14px; font-size: clamp(32px, 8.4vw, 60px); font-weight: 700; line-height: 1.06; letter-spacing: -.032em;
    animation: up .7s .05s var(--ease) both;
}
.grad { background: linear-gradient(90deg, #e9b6f0, #c55ad0 60%, #9d4edd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin: 0; max-width: 540px; font-size: 15px; line-height: 1.65; color: #a8a3ae; animation: up .7s .12s var(--ease) both; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; animation: up .7s .18s var(--ease) both; }
.hero-cta .btn { flex: 1 1 auto; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 28px 0 0; border-top: 1px solid rgba(255, 255, 255, .1); animation: up .7s .24s var(--ease) both; }
.hero-stats div { padding: 14px 0 0 14px; border-left: 1px solid rgba(255, 255, 255, .1); }
.hero-stats div:first-child { padding-left: 0; border-left: 0; }
.hero-stats dt { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.hero-stats dd { margin: 3px 0 0; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #8b8592; }
.hero-visual { display: none; }
@keyframes up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* =========================================================
   BROCHURE THUMBNAIL (shared)
   ========================================================= */
.thumb {
    position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; isolation: isolate; border-radius: 4px; color: #fff;
    background: linear-gradient(165deg, var(--c1) 0%, color-mix(in srgb, var(--c1) 50%, #0b0a10) 100%);
}
.thumb::before { /* fine technical grid + sheen */
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, .16), transparent 38%),
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 100% 12px;
}
.thumb::after { /* corner accent */
    content: ""; position: absolute; z-index: -1; right: -30%; top: -18%; width: 80%; aspect-ratio: 1; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 0 0 14px rgba(255, 255, 255, .03);
}
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.th-brand { position: absolute; left: 10px; top: 10px; font-size: 8.5px; font-weight: 700; letter-spacing: .24em; opacity: .75; }
.th-mark { position: absolute; left: 10px; right: 8px; bottom: 16px; font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1; overflow-wrap: anywhere; }
.th-title { position: absolute; left: 12px; right: 12px; bottom: 18px; font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.th-title ~ .th-bar { bottom: 0; }
.thumb:has(.th-title) .th-mark { bottom: auto; top: 40%; font-size: 40px; }
.th-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--c2), transparent); }

/* =========================================================
   PANELS
   ========================================================= */
.panel { position: relative; margin-top: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }

/* Contents */
.contents { margin-top: -18px; padding: 18px 16px 6px; z-index: 2; box-shadow: var(--shadow-lg); }
.panel-head h2 { margin: 6px 0 10px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.toc { list-style: none; margin: 0; padding: 0; }
.toc li + li { border-top: 1px solid var(--line-2); }
.toc a { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-radius: 6px; transition: background .2s; }
.toc a:active { background: #f9fafb; }
.toc-num { flex: none; width: 30px; font-size: 20px; font-weight: 300; color: var(--c1); font-variant-numeric: tabular-nums; }
.toc-name { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.toc-name small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toc-count { flex: none; min-width: 30px; height: 26px; padding: 0 8px; border-radius: 6px; display: grid; place-items: center; background: #f3f4f6; font-size: 12px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.toc-go { width: 16px; height: 16px; color: #9ca3af; transition: transform .2s var(--ease), color .2s; }

/* =========================================================
   STICKY FINDER
   ========================================================= */
.finder {
    position: sticky; top: 0; z-index: 40; margin-top: 16px; padding: 10px 0 8px;
    background: rgba(243, 244, 246, .88);
    backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
    transition: box-shadow .3s, background .3s;
}
.finder.stuck { background: rgba(255, 255, 255, .94); box-shadow: 0 1px 0 var(--line), 0 8px 20px -16px rgba(16, 18, 24, .4); }
.search {
    display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 8px 0 14px;
    background: #fff; border: 1px solid var(--line); border-radius: 8px; transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(123, 44, 131, .14); }
.search > .ic { color: #9ca3af; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); }
.search input::placeholder { color: #9ca3af; }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; border: 0; background: #f3f4f6; cursor: pointer; }
.search-clear[hidden] { display: none; }
.search-clear .ic { width: 14px; height: 14px; }

.chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px; padding: 10px 16px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
    border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer;
    font-size: 13px; font-weight: 500; color: var(--ink-2); transition: all .2s var(--ease);
}
.chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--c1); }
.chip span { font-size: 11.5px; font-weight: 600; color: #9ca3af; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: #d1d5db; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.on[style] { background: var(--c1); border-color: var(--c1); }
.chip.on i { background: #fff; }
.chip.on span { color: rgba(255, 255, 255, .7); }

/* =========================================================
   FEATURED
   ========================================================= */
.featured { padding-top: 14px; }
.featured[hidden] { display: none; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-head h2 { margin: 4px 0 0; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.swipe-hint { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.swipe-hint .ic { width: 13px; height: 13px; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(3px); } }

.feat-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; scroll-padding: 0 16px; }
.feat-row::-webkit-scrollbar { display: none; }
.feat {
    flex: none; width: min(84vw, 330px); display: flex; gap: 14px; padding: 12px; scroll-snap-align: start;
    background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
    animation: up .6s calc(.1s + var(--i) * .06s) var(--ease) both;
    transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.feat .thumb { flex: none; width: 92px; }
.feat-text { display: flex; flex-direction: column; min-width: 0; padding: 2px 0; }
.feat-text small { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--c1); }
.feat-text strong { margin-top: 6px; font-size: 15px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
.feat-cta { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; padding-top: 10px; font-size: 13px; font-weight: 600; color: var(--c1); }
.feat-cta .ic { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.feat:active { transform: scale(.985); }

/* =========================================================
   PRODUCT LINES
   ========================================================= */
.chapter { margin-top: 22px; padding: 18px 14px 16px; border-top: 3px solid var(--c1); }
.group[hidden], .bro[hidden], .empty[hidden] { display: none; }
.chapter-head { display: flex; align-items: flex-start; gap: 14px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.chapter-num { flex: none; font-size: 40px; font-weight: 300; line-height: .9; letter-spacing: -.04em; color: var(--c1); font-variant-numeric: tabular-nums; }
.chapter-text { flex: 1; min-width: 0; }
.chapter-text h2 { margin: 4px 0 4px; font-size: 20px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.chapter-text p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.chapter-count { display: none; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bro {
    display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 8px;
    animation: up .5s calc(var(--i) * 40ms) var(--ease) both;
    transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.bro:active { transform: scale(.98); }
.bro-media { position: relative; display: block; padding: 8px 8px 0; }
.bro .thumb { aspect-ratio: 4 / 4.4; }
.bro-type { position: absolute; right: 14px; top: 14px; padding: 2px 6px; border-radius: 3px; background: rgba(255, 255, 255, .95); color: var(--c1); font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.bro-body { display: flex; flex-direction: column; flex: 1; padding: 10px 10px 10px; }
.bro-title { font-size: 13px; font-weight: 600; line-height: 1.35; letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bro-desc { margin-top: 4px; font-size: 12px; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bro-meta { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; font-weight: 500; color: var(--muted); }
.bro-go { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--c1); }
.bro-go .ic { width: 12px; height: 12px; transition: transform .2s var(--ease); }

.empty { text-align: center; padding: 48px 16px 20px; }
.empty-ic { width: 56px; height: 56px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--brand); }
.empty-ic .ic { width: 24px; height: 24px; }
.empty h3 { margin: 0 0 4px; font-size: 17px; }
.empty p { margin: 0 0 16px; color: var(--muted); }

/* =========================================================
   CONTACT + FOOTER
   ========================================================= */
.footer { position: relative; overflow: hidden; isolation: isolate; margin-top: 40px; padding: 36px 0 24px; color: #fff; background: var(--night); }
.footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(184, 59, 179, .6), transparent); }
.contact-text h2 { margin: 12px 0 10px; font-size: clamp(22px, 6vw, 32px); font-weight: 700; line-height: 1.15; letter-spacing: -.025em; max-width: 520px; }
.contact-text p { margin: 0 0 22px; font-size: 14px; color: #a8a3ae; max-width: 460px; }
.contact-links { display: grid; gap: 8px; }
.cl {
    display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 8px;
    background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .1);
    transition: background .2s, border-color .2s;
}
.cl:hover { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .18); }
.cl-ic { flex: none; width: 38px; height: 38px; border-radius: 6px; display: grid; place-items: center; background: rgba(184, 59, 179, .16); color: #e9b6f0; }
.cl-whatsapp .cl-ic { background: rgba(37, 211, 102, .16); color: var(--wa); }
.cl-txt { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; word-break: break-word; }
.cl-txt small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #8b8592; }
.cl-go { width: 15px; height: 15px; color: #8b8592; }
.foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); }
.logo-plate.sm img { height: 26px; }
.socials { display: flex; gap: 8px; }
.socials a { width: 38px; height: 38px; border-radius: 6px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .12); color: #cfcbd4; transition: all .2s; }
.socials .ic { width: 16px; height: 16px; }
.socials a:hover { color: #fff; border-color: transparent; }
.so-facebook:hover { background: #1877f2; }
.so-linkedin:hover { background: #0a66c2; }
.so-instagram:hover { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); }
.so-youtube:hover { background: #ff0000; }
.copy { flex: 1 1 100%; margin: 0; font-size: 12px; color: #77717d; }

/* =========================================================
   MOBILE DOCK
   ========================================================= */
.dock {
    position: fixed; z-index: 50; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b));
    display: flex; align-items: center; gap: 2px; height: 60px; padding: 0 6px;
    border-radius: 14px; background: rgba(13, 11, 17, .92); color: rgba(255, 255, 255, .7);
    border: 1px solid rgba(255, 255, 255, .08);
    backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
    box-shadow: 0 16px 36px -12px rgba(13, 11, 17, .6); transition: transform .35s var(--ease);
}
.dock.away { transform: translateY(calc(100% + 24px)); }
.dock a, .dock button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 48px;
    border: 0; background: none; border-radius: 10px; font-size: 10px; font-weight: 500; cursor: pointer; transition: background .2s, color .2s;
}
.dock a:active, .dock button:active { background: rgba(255, 255, 255, .08); color: #fff; }
.dock .ic { width: 20px; height: 20px; }
.dock .dock-main { color: #fff; background: var(--brand); }
.dock .dock-main[href^="https://wa.me"] { background: var(--wa); }

/* =========================================================
   PRODUCT SHEET
   ========================================================= */
.sheet { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(13, 11, 17, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .3s both; }
.sheet.closing .sheet-backdrop { animation: fadeout .25s both; }
.sheet-panel {
    position: relative; width: 100%; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
    background: #fff; border-radius: 16px 16px 0 0; padding-bottom: calc(16px + var(--safe-b));
    box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, .4); animation: slide .4s var(--ease) both;
}
.sheet-panel:focus { outline: none; }
.sheet.closing .sheet-panel { animation: slideout .26s ease-in both; }
.sheet.dragging .sheet-panel { animation: none; }
@keyframes slide { from { transform: translateY(100%); } to { transform: none; } }
@keyframes slideout { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeout { to { opacity: 0; } }
.sheet-grip { position: absolute; z-index: 2; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: #d1d5db; }
.sheet-x { position: absolute; z-index: 2; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; background: #fff; cursor: pointer; }
.sheet-x .ic { width: 16px; height: 16px; }
.sheet-art {
    position: relative; display: grid; place-items: center; padding: 26px 0 22px; border-radius: 16px 16px 0 0;
    background: linear-gradient(180deg, #f6f7f9, #eef0f3); border-bottom: 1px solid var(--line);
}
.sheet-cover {
    position: relative; display: block; width: 104px; aspect-ratio: 3 / 4; overflow: hidden; isolation: isolate; border-radius: 4px; color: #fff;
    background: linear-gradient(165deg, var(--c1) 0%, color-mix(in srgb, var(--c1) 50%, #0b0a10) 100%); background-size: cover; background-position: center;
    box-shadow: 0 18px 30px -14px rgba(16, 18, 24, .5); animation: up .5s .08s var(--ease) both;
}
.sheet-cover::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, rgba(255, 255, 255, .16), transparent 38%), linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 100% 12px; }
.sheet-cover.has-img .th-brand, .sheet-cover.has-img .sheet-mark, .sheet-cover.has-img .th-bar { display: none; }
.sheet-mark { position: absolute; left: 10px; right: 8px; bottom: 16px; font-size: 24px; font-weight: 800; letter-spacing: -.03em; line-height: 1; overflow-wrap: anywhere; }
.sheet-type { position: absolute; left: 16px; top: 14px; padding: 3px 8px; border-radius: 4px; background: #fff; border: 1px solid var(--line); color: var(--c1); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.sheet-body { padding: 16px 18px 0; }
.sheet-cat { display: inline-block; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--c1); }
.sheet-body h3 { margin: 6px 0 6px; font-size: 19px; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; }
.sheet-desc { margin: 0 0 6px; color: var(--ink-2); font-size: 14px; }
.sheet-desc:empty { display: none; }
.sheet-meta { margin: 0 0 16px; font-size: 12px; font-weight: 500; color: var(--muted); }
.sheet-actions { display: grid; gap: 8px; }
.sheet-actions [hidden] { display: none !important; }
.sheet-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet-row:has(.btn[hidden]) { grid-template-columns: 1fr; }

/* =========================================================
   FLIPBOOK
   ========================================================= */
.flip { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; color: #fff; background: radial-gradient(100% 70% at 50% 40%, #221b28 0%, var(--night) 75%); animation: fade .3s both; }
.flip[hidden] { display: none; }
.flip-bar, .flip-nav { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.flip-bar { padding-top: calc(10px + env(safe-area-inset-top, 0px)); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.flip-nav { justify-content: space-between; padding-bottom: calc(12px + var(--safe-b)); }
.flip-info { flex: 1; min-width: 0; text-align: center; }
.flip-info strong { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flip-count { font-size: 11.5px; color: #8b8592; font-weight: 500; font-variant-numeric: tabular-nums; }
.flip-btn { flex: none; width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); color: #fff; transition: background .2s; }
.flip-btn:hover { background: rgba(255, 255, 255, .12); }
.flip-btn:disabled { opacity: .3; cursor: default; }
.flip-hint { font-size: 12px; color: #8b8592; text-align: center; }
.flip-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; padding: 6px 10px; overflow: hidden; }
.flip-book { margin: 0 auto; }
.flip-page { background: #fff; overflow: hidden; }
.flip-page canvas { display: block; width: 100%; height: 100%; }
.flip-page .ph { width: 100%; height: 100%; display: grid; place-items: center; color: #c4c8cf; font-size: 24px; font-weight: 300; background: #f9fafb; }
.flip-loading, .flip-error { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 20px; }
.flip-loading[hidden], .flip-error[hidden] { display: none; }
.flip-spinner { width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .12); border-top-color: var(--brand-2); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.flip-progress { font-size: 13px; font-weight: 500; color: #a8a3ae; }
.flip-error p { margin: 0; color: #cfcbd4; }

/* ---------- Toast ---------- */
.toast {
    position: fixed; z-index: 300; left: 50%; bottom: calc(88px + var(--safe-b)); transform: translate(-50%, 16px);
    padding: 10px 14px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 500;
    box-shadow: 0 12px 26px -10px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: all .3s var(--ease); white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   TABLET / DESKTOP
   ========================================================= */
@media (hover: hover) {
    .bro:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c1) 30%, var(--line)); }
    .bro:hover .bro-go .ic, .feat:hover .feat-cta .ic { transform: translateX(3px); }
    .feat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c1) 30%, var(--line)); }
    .toc a:hover { background: #f9fafb; }
    .toc a:hover .toc-go { color: var(--c1); transform: translateX(3px); }
}

@media (min-width: 720px) {
    .wrap { padding: 0 28px; }
    .hero { padding: 20px 0 70px; }
    .logo-plate img { height: 38px; }
    .hero-body { padding-top: 64px; }
    .lead { font-size: 16.5px; }
    .hero-cta .btn { flex: none; }
    .hero-stats { max-width: 480px; }
    .hero-stats dt { font-size: 28px; }
    .contents { margin-top: -40px; padding: 26px 28px 10px; display: grid; grid-template-columns: 240px 1fr; gap: 0 40px; }
    .panel-head h2 { font-size: 26px; }
    .finder { padding: 12px 0 10px; }
    .finder .wrap { display: flex; align-items: center; gap: 16px; }
    .search { flex: 0 0 320px; order: 2; }
    .chips { flex: 1; margin: 0; padding: 2px; }
    .feat-row { margin: 0; padding: 2px 2px 6px; }
    .chapter { padding: 26px 26px 24px; }
    .chapter-head { align-items: flex-end; }
    .chapter-num { font-size: 56px; }
    .chapter-text h2 { font-size: 24px; }
    .chapter-count { display: block; flex: none; text-align: right; font-size: 24px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
    .chapter-count small { display: block; margin-top: 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
    .grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
    .contact { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
    .contact-text p { margin-bottom: 0; }
    .copy { flex: none; }
    .sheet { align-items: center; padding: 24px; }
    .sheet-panel { max-width: 420px; border-radius: 14px; padding-bottom: 20px; animation-name: zoom; }
    .sheet.closing .sheet-panel { animation-name: zoomout; }
    .sheet-art { border-radius: 14px 14px 0 0; }
    .sheet-grip { display: none; }
    @keyframes zoom { from { transform: translateY(16px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
    @keyframes zoomout { to { transform: translateY(16px) scale(.97); opacity: 0; } }
}

@media (min-width: 1040px) {
    body { padding-bottom: 0; }
    .dock { display: none; }
    .toast { bottom: 32px; }
    .hero-body { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding-top: 72px; }
    .hero-visual { display: block; position: relative; height: 380px; }
    .hv { position: absolute; width: 210px; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .5)); animation: up .8s var(--ease) both; }
    .hv .thumb { border-radius: 6px; outline: 1px solid rgba(255, 255, 255, .12); outline-offset: -1px; }
    .hv-1 { left: 0; top: 50px; rotate: -6deg; animation-delay: .25s; }
    .hv-2 { left: 120px; top: 0; z-index: 2; animation-delay: .35s; }
    .hv-3 { left: 240px; top: 60px; rotate: 6deg; animation-delay: .45s; }
    .swipe-hint { display: none; }
    .feat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); overflow: visible; }
    .feat { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}

/* =========================================================
   VIDEO BADGE + IMAGE/VIDEO VIEWER
   ========================================================= */
.th-play {
    position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
    background: rgba(255, 255, 255, .95); box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .5);
}
.th-play::after {
    content: ""; position: absolute; left: 17px; top: 13px;
    border-left: 13px solid var(--c1, var(--brand)); border-top: 9px solid transparent; border-bottom: 9px solid transparent;
}
.sheet-cover .th-play { display: none; }
.sheet-cover.is-video .th-play { display: block; }
.viewer-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 12px; padding-bottom: calc(12px + var(--safe-b)); }
.viewer-stage img, .viewer-stage video { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7); background: #000; }
.viewer-stage img { background: #fff; touch-action: pinch-zoom; }
