/* ITS Digital Tools — site styles (Phase A design). Bootstrap 5.3 CSS is loaded first. */
:root {
  --ink: #0E1F19; --muted: #4A5E56; --line: #D9E4DE; --bg: #F6F9F7; --panel: #FFFFFF;
  --accent: #0B6E5A; --accent-dark: #085747; --accent-2: #F2A33A; --accent-soft: #E3F2EC;
  --blue: #3B5BDB; --good-bg: #DDF1EA; --bad-bg: #FBE3E1; --bad-ink: #8A1C12; --focus: #064A3C;
  --r: 18px; --shadow: 0 14px 30px rgba(14, 31, 25, .10);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html { scroll-behavior: smooth; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.6; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { letter-spacing: -.01em; }
.muted, .meta { color: var(--muted); }
.meta { font-size: .88rem; }
.narrow { max-width: 760px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--panel); color: var(--ink); padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* Buttons */
.btn { border-radius: 12px; font-weight: 700; transition: transform .15s var(--ease), box-shadow .15s var(--ease), background-color .15s; }
.btn:active { transform: scale(.97); }
.btn-accent { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn-accent:hover, .btn-accent:focus { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; box-shadow: 0 8px 18px rgba(11, 110, 90, .25); }
.btn-accent:disabled { opacity: .6; }
.btn-line { border: 2px solid var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: .8rem 1.4rem; }

/* Header */
.site-header { background: rgba(255, 255, 255, .92); backdrop-filter: saturate(160%) blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; transition: box-shadow .2s; }
.site-header.scrolled { box-shadow: 0 6px 20px rgba(14, 31, 25, .08); }
.hdr-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .8rem; padding-bottom: .8rem; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: .55rem; }
.brand:hover { color: var(--ink); }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: .78rem; letter-spacing: .02em; transition: transform .3s var(--ease); }
.brand:hover .logo { transform: rotate(-8deg) scale(1.06); }
.site-nav { display: flex; align-items: center; gap: 1.4rem; }
.site-nav ul { display: flex; gap: 1.3rem; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; position: relative; }
.site-nav ul a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.site-nav ul a:hover::after, .site-nav ul a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav ul a[aria-current="page"] { color: var(--accent); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: #fff; position: relative; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { position: absolute; left: 11px; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s var(--ease), top .25s var(--ease), background-color .2s; content: ""; }
.nav-toggle .bars { top: 21px; }
.nav-toggle .bars::before { left: 0; top: -6px; }
.nav-toggle .bars::after { left: 0; top: 6px; }
.nav-open .nav-toggle .bars { background: transparent; }
.nav-open .nav-toggle .bars::before { top: 0; transform: rotate(45deg); }
.nav-open .nav-toggle .bars::after { top: 0; transform: rotate(-45deg); }
@media (max-width: 991.98px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: .5rem; padding: 0 1rem; max-height: 0; overflow: hidden; transition: max-height .35s var(--ease), padding .35s var(--ease); }
  .nav-open .site-nav { max-height: 80vh; padding: .75rem 1rem 1.25rem; box-shadow: 0 16px 30px rgba(14, 31, 25, .10); }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .site-nav ul a::after { display: none; }
  .nav-cta { align-self: flex-start; margin-top: .5rem; }
}

/* Hero */
.hero { background: radial-gradient(1200px 500px at 85% 10%, #FFE8C7 0, transparent 60%), radial-gradient(900px 500px at 0% 100%, #D6F0E6 0, transparent 60%), #fff; border-bottom: 1px solid var(--line); overflow: hidden; position: relative; }
.hero::before { content: ""; position: absolute; width: 420px; height: 420px; right: -140px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(242, 163, 58, .25), transparent 70%); animation: drift 14s ease-in-out infinite alternate; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); font-weight: 850; letter-spacing: -.02em; line-height: 1.1; }
.hero h1 .hl { color: var(--accent); background: linear-gradient(90deg, var(--accent), #12A07F, var(--accent)); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: shine 6s linear infinite; }
.hero .lead { color: var(--muted); font-size: 1.15rem; max-width: 560px; }
.pill { display: inline-block; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .8rem; padding: .3rem .75rem; border-radius: 99px; }
.stack { position: relative; height: 420px; }
.stack .s { position: absolute; width: 230px; border-radius: 14px; box-shadow: 0 18px 40px rgba(14, 31, 25, .18); border: 1px solid var(--line); background: #fff; overflow: hidden; }
.stack .s img, .stack .s .cover-ph { display: block; width: 100%; }
.stack .s1 { left: 6%; top: 40px; --rot: -7deg; animation: floatA 7s ease-in-out infinite; }
.stack .s2 { left: 31%; top: 0; z-index: 2; --rot: 0deg; animation: floatA 6s ease-in-out infinite .6s; }
.stack .s3 { left: 56%; top: 50px; --rot: 7deg; animation: floatA 8s ease-in-out infinite 1.2s; }
@media (max-width: 991.98px) { .stack { height: 300px; } .stack .s { width: 160px; } }
@media (max-width: 575.98px) { .stack { height: 250px; } .stack .s { width: 130px; } }

/* Hero entrance */
.hero-in > * { opacity: 0; transform: translateY(18px); animation: rise .8s var(--ease) forwards; }
.hero-in > *:nth-child(2) { animation-delay: .1s; }
.hero-in > *:nth-child(3) { animation-delay: .2s; }
.hero-in > *:nth-child(4) { animation-delay: .3s; }
.hero-in > *:nth-child(5) { animation-delay: .4s; }
.stack { opacity: 0; animation: fadeIn 1s var(--ease) .35s forwards; }

/* Trust strip */
.trust { background: #fff; border-bottom: 1px solid var(--line); }
.trust .item { display: flex; align-items: center; gap: .6rem; font-weight: 600; font-size: .95rem; }
.trust .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; font-size: 1.1rem; flex: none; }

/* Sections */
.sec-h { font-weight: 800; letter-spacing: -.01em; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 800; color: var(--accent); }
.page-head { background: #fff; border-bottom: 1px solid var(--line); }
.crumbs { font-size: .85rem; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* Category tiles */
.cat { border-radius: var(--r); overflow: hidden; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); display: block; height: 100%; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.cat:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--ink); }
.cat .art { height: 150px; display: grid; place-items: center; font-size: 3.2rem; overflow: hidden; }
.cat .art img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.cat:hover .art img { transform: scale(1.05); }
.cat .art .emo { transition: transform .35s var(--ease); }
.cat:hover .art .emo { transform: scale(1.15) rotate(-6deg); }
.cat .body { padding: 1rem 1.1rem; }
.cat .count { font-size: .85rem; color: var(--muted); }

/* Theme colours (categories and placeholder covers) */
.theme-green { --t-bg: #E3F2EC; --t-ink: #0B6E5A; }
.theme-blue { --t-bg: #E7ECFF; --t-ink: #2F49B8; }
.theme-amber { --t-bg: #FFF1DC; --t-ink: #9A5B00; }
.theme-rose { --t-bg: #FCE7EF; --t-ink: #A3244F; }
.theme-violet { --t-bg: #EFE8FF; --t-ink: #5B34B8; }
.theme-teal { --t-bg: #DFF5F5; --t-ink: #0F6F73; }
.cat .art { background: var(--t-bg, #E3F2EC); }

/* Product cards */
.card-p { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.card-p:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card-p .cover { text-decoration: none; background: linear-gradient(#F1F6F3, #E6EFEA); padding: 1.2rem; display: grid; place-items: center; position: relative; aspect-ratio: 4 / 4.2; }
.card-p .cover img { max-height: 100%; width: auto; border-radius: 8px; box-shadow: 0 8px 20px rgba(0, 0, 0, .12); transition: transform .35s var(--ease); object-fit: contain; }
.card-p:hover .cover img, .card-p:hover .cover .cover-ph { transform: scale(1.04) rotate(-1deg); }
.card-p .cover .cover-ph { width: 72%; transition: transform .35s var(--ease); }
.badge-t { position: absolute; top: .8rem; left: .8rem; z-index: 2; background: var(--accent-2); color: #2b1a00; font-weight: 800; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; padding: .28rem .65rem; border-radius: 99px; }
.badge-t.is-free { background: var(--blue); color: #fff; }
.card-p .body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.card-p h3 { font-size: 1.05rem; font-weight: 800; margin: 0 0 .25rem; }
.card-p h3 a { color: var(--ink); text-decoration: none; }
.card-p h3 a:hover { color: var(--accent); }
.card-p .cat-link { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; text-decoration: none; margin-bottom: .2rem; }
.card-p .foot { margin-top: auto; padding-top: .6rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.price { font-size: 1.3rem; font-weight: 850; color: var(--ink); }

/* Placeholder cover (products without an uploaded cover) */
.cover-ph { aspect-ratio: 3 / 4; border-radius: 10px; background: linear-gradient(160deg, var(--t-bg, #E3F2EC) 0%, #fff 100%); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1rem; gap: .5rem; box-shadow: 0 8px 20px rgba(0, 0, 0, .10); }
.cover-ph .ph-icon { font-size: 2.6rem; }
.cover-ph .ph-name { font-weight: 800; font-size: 1.05rem; color: var(--t-ink, var(--accent)); line-height: 1.2; }
.cover-ph .ph-brand { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* How it works */
.steps .n { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 1.1rem; position: relative; }
.steps .n::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent); opacity: .25; animation: pulse 2.6s ease-out infinite; }

/* Free band */
.band { background: linear-gradient(120deg, var(--accent) 0%, #0F8C72 60%, #12A07F 100%); background-size: 200% 200%; animation: gradientMove 12s ease infinite; color: #fff; border-radius: 24px; position: relative; overflow: hidden; }
.band::after { content: ""; position: absolute; width: 260px; height: 260px; right: -80px; bottom: -120px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.band .sub { color: #D7EFE7; }
.band .form-control { border: 0; border-radius: 12px; padding: .8rem 1rem; }
.band .btn-light { font-weight: 800; border-radius: 12px; padding: .8rem 1.3rem; }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; margin-bottom: .7rem; transition: box-shadow .2s; }
.faq details[open] { box-shadow: 0 8px 18px rgba(14, 31, 25, .06); }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 800; color: var(--accent); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }

/* Product page */
.p-cover { background: linear-gradient(#F1F6F3, #E6EFEA); border-radius: var(--r); padding: 1.5rem; display: grid; place-items: center; border: 1px solid var(--line); }
.p-cover img { border-radius: 10px; box-shadow: 0 16px 36px rgba(0, 0, 0, .16); max-height: 560px; width: auto; }
.p-cover .cover-ph { width: 70%; }
.gallery { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.gallery a { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; aspect-ratio: 3 / 4; }
.gallery img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .35s var(--ease); }
.gallery a:hover img { transform: scale(1.06); }
.p-price { font-size: 2rem; font-weight: 850; }
.p-price.free { color: var(--blue); }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 1.8rem; margin-bottom: .45rem; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: .05rem; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .75rem; display: grid; place-items: center; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
.facts div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; font-size: .9rem; }
.facts strong { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.buy-box { position: relative; }
@media (min-width: 992px) { .buy-col { position: sticky; top: 90px; } }
.mobile-buy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); padding: .6rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; transform: translateY(110%); transition: transform .3s var(--ease); box-shadow: 0 -8px 20px rgba(14, 31, 25, .08); }
.mobile-buy.show { transform: none; }
@media (min-width: 992px) { .mobile-buy { display: none; } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(8, 16, 13, .88); display: grid; place-items: center; padding: 2rem; opacity: 0; pointer-events: none; transition: opacity .25s; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-height: 90vh; max-width: 92vw; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); transform: scale(.96); transition: transform .3s var(--ease); }
.lightbox.open img { transform: none; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .15); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 1.4rem; }
.lightbox .lb-close { top: 1rem; right: 1rem; }
.lightbox .lb-prev { left: 1rem; top: 50%; }
.lightbox .lb-next { right: 1rem; top: 50%; }

/* Forms and messages */
.form-control, .form-select { border-color: var(--line); border-radius: 10px; }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(11, 110, 90, .2); }
.form-msg { min-height: 1.5rem; margin-top: .75rem; }
.form-msg.ok { background: var(--good-bg); padding: .6rem .8rem; border-radius: 8px; }
.form-msg.err { background: var(--bad-bg); color: var(--bad-ink); padding: .6rem .8rem; border-radius: 8px; }
.notice { background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; padding: .8rem 1rem; }
.quote { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; margin: 0; }
.quote dt { color: var(--muted); font-weight: 500; }
.quote dd { margin: 0; text-align: right; font-weight: 600; }
.file-list { list-style: none; padding: 0; margin: 0; }
.file-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.file-list form { margin: 0; width: 100%; }
.cover-lg { border-radius: var(--r); border: 1px solid var(--line); }

/* Footer */
.site-footer { margin-top: 4rem; padding: 3rem 0 2rem; background: #0E1F19; color: #C9D8D1; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.brand-light, .brand-light:hover { color: #fff; }
.ft-h { color: #fff; font-weight: 800; font-size: .95rem; margin-bottom: .6rem; }
.ft-links { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.ft-links li { margin-bottom: .35rem; }
.ft-rule { border-color: rgba(255, 255, 255, .15); margin: 2rem 0 1rem; opacity: 1; }

/* Scroll reveal (site.js adds .in when visible) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* Keyframes */
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes floatA { 0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); } 50% { transform: translateY(-12px) rotate(var(--rot, 0deg)); } }
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(-60px, 40px); } }
@keyframes shine { to { background-position: 200% center; } }
@keyframes pulse { 0% { transform: scale(1); opacity: .35; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes gradientMove { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-in > *, .stack, .js .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* Admin */
.admin-nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.admin-nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.admin-nav a[aria-current="page"], .admin-nav a:hover { color: var(--accent); text-decoration: underline; }
.table { --bs-table-bg: transparent; --bs-table-color: var(--ink); --bs-table-border-color: var(--line); }
.table th { color: var(--muted); font-weight: 600; font-size: .85rem; }
.panel.p-0 .table th:first-child, .panel.p-0 .table td:first-child { padding-left: 1rem; }
.thumbs { display: flex; flex-wrap: wrap; gap: .75rem; }
.thumbs figure { margin: 0; width: 110px; text-align: center; font-size: .75rem; }
.thumbs img { width: 110px; height: 140px; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.cover-thumb { width: 150px; border: 1px solid var(--line); border-radius: 8px; }
