/* ==========================================================================
   HAPEE · Design system
   Brand: deep teal #094440 + golden yellow #F4C430 (from the Hapee smiley)
   ========================================================================== */

:root {
  --teal-950: #031f1d;
  --teal-900: #052825;
  --teal-800: #073a36;
  --teal-700: #094440;
  --teal-600: #0c5a54;
  --teal-500: #127a72;
  --teal-300: #5fc3b6;
  --teal-100: #d7efea;
  --gold: #f4c430;
  --gold-600: #e2ac0b;
  --gold-300: #ffe08a;

  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 40px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --container: 1220px;
  --header-h: 76px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fbf8f0;
  --bg-2: #f3eedf;
  --surface: #ffffff;
  --surface-2: #f7f3e7;
  --text: #0a2e2b;
  --muted: #4d6c67;
  --line: rgba(9, 68, 64, .13);
  --brand: #094440;
  --accent: #e5b10a;
  --accent-text: #8a6700;
  --on-accent: #073a36;
  --header-bg: rgba(251, 248, 240, .82);
  --shadow-sm: 0 2px 10px rgba(9, 68, 64, .07);
  --shadow-md: 0 14px 40px rgba(9, 68, 64, .12);
  --shadow-lg: 0 34px 80px rgba(9, 68, 64, .18);
  --glow: rgba(244, 196, 48, .35);
  --card-spot: rgba(244, 196, 48, .18);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #031f1d;
  --bg-2: #052825;
  --surface: #08332f;
  --surface-2: #0b3f3a;
  --text: #e8f5f2;
  --muted: #9cc3bc;
  --line: rgba(255, 255, 255, .1);
  --brand: #f4c430;
  --accent: #f4c430;
  --accent-text: #f4c430;
  --on-accent: #073a36;
  --header-bg: rgba(3, 31, 29, .78);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .3);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, .38);
  --shadow-lg: 0 34px 80px rgba(0, 0, 0, .5);
  --glow: rgba(244, 196, 48, .28);
  --card-spot: rgba(244, 196, 48, .12);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
img, svg, video, canvas { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
::selection { background: var(--gold); color: var(--teal-800); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--gold); color: var(--teal-800); padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { left: 8px; }
.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.notranslate { unicode-bidi: isolate; }

/* google translate cleanup */
body { top: 0 !important; }
.goog-te-banner-frame, .skiptranslate iframe, #goog-gt-tt, .goog-tooltip, .goog-te-balloon-frame { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
#google_translate_element { position: absolute; width: 0; height: 0; overflow: hidden; opacity: 0; pointer-events: none; }

/* ---------- preloader ---------- */
#preloader {
  position: fixed; inset: 0; z-index: 9999; background: #031f1d;
  display: grid; place-items: center;
  transition: opacity .7s var(--ease), visibility .7s;
}
#preloader img { width: min(240px, 56vw); height: auto; }
#preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
#preloader .pl-brand { position: absolute; bottom: 12vh; text-align: center; color: #e8f5f2; font: 600 14px var(--font-body); letter-spacing: .3em; text-transform: uppercase; opacity: .8; }
#preloader .pl-brand b { display: block; font: 800 26px var(--font-display); letter-spacing: -.01em; text-transform: none; color: #fff; margin-bottom: 4px; }
#preloader .pl-brand span { color: var(--gold); letter-spacing: .12em; }
html.no-preload #preloader { display: none; }
html.pl-lock { overflow: hidden; }

/* ---------- buttons ---------- */
.btn {
  --h: 50px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--h); padding: 0 26px; border-radius: 999px; border: 1.5px solid transparent;
  font: 700 15.5px/1 var(--font-body); letter-spacing: .005em; white-space: nowrap; overflow: hidden;
  transition: transform .35s var(--ease-spring), box-shadow .35s var(--ease), background .3s, color .3s, border-color .3s;
  isolation: isolate;
}
.btn i { font-size: 1.1em; transition: transform .35s var(--ease); }
.btn:hover i.bi-arrow-right, .btn:hover i.bi-arrow-up-right { transform: translateX(4px); }
.btn-lg { --h: 58px; padding: 0 32px; font-size: 16.5px; }
.btn-sm { --h: 40px; padding: 0 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, #ffd24d, var(--gold) 55%, #e8ad0d); color: var(--on-accent); box-shadow: 0 10px 30px -8px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .6) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s var(--ease); z-index: -1; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -8px var(--glow); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:active { transform: translateY(0) scale(.98); }
.btn-dark { background: var(--teal-700); color: #fff; }
.btn-dark:hover { background: var(--teal-600); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn-glass { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .28); backdrop-filter: blur(10px); }
.btn-glass:hover { background: rgba(255, 255, 255, .2); transform: translateY(-3px); border-color: rgba(255, 255, 255, .5); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--line); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-text); transform: translateY(-3px); }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }
.btn.is-loading { pointer-events: none; opacity: .8; }
.btn.is-loading::before { content: ''; width: 16px; height: 16px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- header ---------- */
.header { position: fixed; inset: 0 0 auto 0; z-index: 100; color: #fff; transition: background .4s var(--ease), color .4s, box-shadow .4s, transform .5s var(--ease); }
.header .announce { background: linear-gradient(90deg, #052825, #0c5a54, #052825); background-size: 200% 100%; animation: shimmerBg 8s linear infinite; color: #e8f5f2; font-size: 13.5px; font-weight: 600; text-align: center; overflow: hidden; max-height: 44px; transition: max-height .4s var(--ease), opacity .3s; }
.header .announce a, .header .announce span { display: block; padding: 10px 44px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { .header .announce { font-size: 12.5px; } .header .announce a, .header .announce span { padding-inline: 38px; } }
.header .announce a:hover { color: var(--gold); }
.announce-close { position: absolute; right: 10px; top: 6px; width: 30px; height: 30px; border: 0; background: transparent; color: inherit; opacity: .7; border-radius: 50%; }
.announce-close:hover { opacity: 1; background: rgba(255, 255, 255, .12); }
.header.is-scrolled .announce { max-height: 0; opacity: 0; }
@keyframes shimmerBg { to { background-position: -200% 0; } }
.header .bar { display: flex; align-items: center; gap: 22px; height: var(--header-h); transition: height .4s var(--ease); }
.header.is-scrolled { background: var(--header-bg); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); color: var(--text); box-shadow: 0 1px 0 var(--line), var(--shadow-sm); }
.header.is-scrolled .bar { height: 66px; }
.header.is-hidden { transform: translateY(-110%); }
.brand { display: inline-flex; align-items: center; gap: 12px; font: 800 26px/1 var(--font-display); letter-spacing: -.03em; flex-shrink: 0; }
.brand img { width: 42px; height: 42px; border-radius: 13px; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); transition: transform .6s var(--ease-spring); }
.brand:hover img { transform: rotate(-8deg) scale(1.08); }
.nav { display: flex; align-items: center; gap: 4px; margin-inline: auto; }
.nav a { position: relative; padding: 10px 14px; font-weight: 600; font-size: 15px; border-radius: 999px; opacity: .88; transition: opacity .25s, background .25s, color .25s; }
.nav a::after { content: ''; position: absolute; left: 50%; bottom: 4px; width: 0; height: 2px; background: var(--gold); border-radius: 2px; transition: width .35s var(--ease), left .35s var(--ease); }
.nav a:hover, .nav a.is-active { opacity: 1; }
.nav a:hover::after, .nav a.is-active::after { width: 22px; left: calc(50% - 11px); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08); color: inherit; transition: all .3s var(--ease); font-size: 18px; }
.header.is-scrolled .icon-btn { border-color: var(--line); background: var(--surface); }
.icon-btn:hover { transform: translateY(-2px) rotate(8deg); border-color: var(--gold); color: var(--gold); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: inline; }
.lang { position: relative; }
.lang-btn { height: 44px; padding: 0 14px; width: auto; gap: 8px; display: inline-flex; align-items: center; font: 700 13px var(--font-body); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 12px); width: 250px; max-height: 360px; overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.97); transform-origin: top right; transition: all .3s var(--ease); z-index: 10; }
.lang.is-open .lang-menu { opacity: 1; visibility: visible; transform: none; }
@media (max-width: 560px) {
  .lang { position: static; }
  .lang-menu { position: fixed; left: 12px; right: 12px; top: calc(var(--header-h) + 10px); width: auto; max-height: 68vh; transform-origin: top center; }
}
.lang-menu input { width: 100%; padding: 10px 14px; margin-bottom: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: inherit; font: inherit; font-size: 14px; }
.lang-menu button { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 10px 12px; border: 0; background: transparent; border-radius: 10px; text-align: left; font-size: 14.5px; font-weight: 500; }
.lang-menu button small { color: var(--muted); font-size: 12px; }
.lang-menu button:hover, .lang-menu button.is-current { background: var(--surface-2); }
.lang-menu button.is-current::after { content: '✓'; color: var(--accent-text); font-weight: 800; }
.burger { display: none; place-content: center; justify-items: center; }
.header.is-scrolled .btn-glass { background: var(--surface); color: var(--text); border-color: var(--line); backdrop-filter: none; }
.header.is-scrolled .btn-glass:hover { border-color: var(--accent); color: var(--accent-text); background: var(--surface); }
.burger span { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .35s var(--ease), opacity .2s; }
.burger span + span { margin-top: 5px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu { position: fixed; inset: 0; z-index: 99; background: var(--teal-950); color: #fff; padding: calc(var(--header-h) + 50px) 28px 40px; display: flex; flex-direction: column; gap: 6px; overflow: auto; clip-path: circle(0 at calc(100% - 44px) 44px); transition: clip-path .7s var(--ease); visibility: hidden; }
.mobile-menu.is-open { clip-path: circle(150% at calc(100% - 44px) 44px); visibility: visible; }
.mobile-menu a.m-link { font: 700 clamp(28px, 7vw, 40px)/1.2 var(--font-display); padding: 8px 0; opacity: 0; transform: translateY(24px); transition: opacity .5s var(--ease), transform .5s var(--ease), color .2s; }
.mobile-menu.is-open a.m-link { opacity: 1; transform: none; transition-delay: calc(var(--i) * 50ms + 200ms); }
.mobile-menu a.m-link:hover { color: var(--gold); }
.mobile-menu .m-cta { margin-top: 24px; display: grid; gap: 12px; }

@media (max-width: 1120px) {
  .nav, .header-actions .btn-app { display: none; }
  .burger { display: inline-grid; }
}
@media (max-width: 560px) {
  .header-actions .btn-webapp { display: none; }
  .brand { font-size: 23px; }
  .lang-btn .lang-label { display: none; }
  .lang-btn { padding: 0; width: 44px; justify-content: center; }
}

/* ---------- sections / typography ---------- */
.section { padding: clamp(72px, 10vw, 140px) 0; position: relative; }
.section-alt { background: var(--bg-2); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 700 13px/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 18px; }
.eyebrow::before { content: ''; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.h-xl { font-size: clamp(40px, 6.2vw, 84px); letter-spacing: -.04em; }
.h-lg { font-size: clamp(32px, 4.4vw, 58px); }
.h-md { font-size: clamp(24px, 2.8vw, 34px); }
.lead { font-size: clamp(17.5px, 1.5vw, 20.5px); color: var(--muted); max-width: 62ch; }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lead { margin-inline: auto; }
.gradient-text { background: linear-gradient(100deg, var(--gold) 0%, #fff2b8 40%, var(--gold) 80%); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; }
:root[data-theme="light"] .section .gradient-text, :root[data-theme="light"] .cta-light .gradient-text { background-image: linear-gradient(100deg, #b98a00, #e5b10a 40%, #b98a00 80%); background-size: 200% auto; }
@keyframes shine { to { background-position: 200% center; } }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(36px); filter: blur(6px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); transition-delay: calc(var(--d, 0) * 1ms); }
.reveal.in { opacity: 1; transform: none; filter: none; }
.reveal-l { transform: translateX(-48px); }
.reveal-r { transform: translateX(48px); }
.reveal-s { transform: scale(.92); }
@media (max-width: 900px) { .reveal-l, .reveal-r { transform: translateY(36px); } }
.no-js .reveal { opacity: 1; transform: none; filter: none; }

/* ---------- cards ---------- */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; box-shadow: var(--shadow-sm); transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .4s; overflow: hidden; }
.card.spot::before { content: ''; position: absolute; inset: 0; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--card-spot), transparent 60%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.card.spot:hover::before { opacity: 1; }
.card.spot:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: var(--shadow-md); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text); }

/* ---------- forms ---------- */
.field { margin-bottom: 18px; position: relative; }
.field label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.input, .textarea, .select { width: 100%; padding: 15px 18px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: 500 16px var(--font-body); transition: border-color .25s, box-shadow .25s, background .25s; outline: none; appearance: none; -webkit-appearance: none; }
.textarea { min-height: 150px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }
.field-error { color: #e0534a; font-size: 13.5px; font-weight: 600; margin-top: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; overflow: hidden; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- page hero (inner pages) ---------- */
.page-hero { position: relative; padding: calc(var(--header-h) + 90px) 0 90px; background: radial-gradient(900px 420px at 85% 0%, rgba(244, 196, 48, .16), transparent 60%), radial-gradient(700px 500px at 0% 100%, rgba(95, 195, 182, .18), transparent 60%), linear-gradient(160deg, #0a4a45 0%, #052825 60%, #031f1d 100%); color: #fff; overflow: hidden; isolation: isolate; }
.page-hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(244, 196, 48, .5), transparent); }
.page-hero .eyebrow { color: var(--gold); }
.page-hero h1 { font-size: clamp(38px, 5.6vw, 76px); letter-spacing: -.04em; max-width: 18ch; }
.page-hero.wide h1 { max-width: 26ch; }
.page-hero p.lead { color: #bfe0da; }
.page-hero .orb { position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: .55; animation: floaty 12s ease-in-out infinite; }
.page-hero .orb.a { width: 340px; height: 340px; right: -60px; top: 10%; background: rgba(244, 196, 48, .35); }
.page-hero .orb.b { width: 280px; height: 280px; left: 6%; bottom: -80px; background: rgba(18, 122, 114, .6); animation-delay: -5s; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: #9cc3bc; margin-bottom: 22px; }
.crumbs a:hover { color: var(--gold); }
.crumbs span.sep { opacity: .5; }
@keyframes floaty { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(20px, -30px, 0); } }

/* ---------- prose (blog article body) ---------- */
.prose { font-size: 18.5px; line-height: 1.85; color: var(--text); }
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.4em; color: color-mix(in srgb, var(--text) 92%, transparent); }
.prose h2 { font-size: clamp(28px, 3vw, 38px); margin: 2em 0 .6em; scroll-margin-top: 100px; }
.prose h3 { font-size: clamp(22px, 2.2vw, 28px); margin: 1.8em 0 .5em; scroll-margin-top: 100px; }
.prose h4 { font-size: 20px; margin: 1.6em 0 .4em; }
.prose a { color: var(--accent-text); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent); transition: text-decoration-color .2s; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.5em; }
.prose li { margin-bottom: .55em; padding-left: .3em; }
.prose li::marker { color: var(--accent-text); font-weight: 800; }
.prose ol > li[data-list="bullet"] { list-style-type: disc; }
.prose blockquote { margin: 2em 0; padding: 26px 30px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--gold); font: 600 clamp(20px, 2vw, 25px)/1.5 var(--font-display); color: var(--text); letter-spacing: -.01em; }
.prose img { border-radius: var(--r-md); margin: 2em auto; box-shadow: var(--shadow-md); height: auto; }
.prose pre, .prose .ql-syntax { background: #031f1d; color: #d7efea; padding: 22px 26px; border-radius: var(--r-md); overflow: auto; font: 14.5px/1.7 'JetBrains Mono', Consolas, monospace; margin: 2em 0; }
.prose code { background: var(--surface-2); padding: 2px 8px; border-radius: 7px; font-size: .88em; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 3em 0; }
.prose .video-embed { position: relative; aspect-ratio: 16 / 9; margin: 2em 0; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-md); background: #000; }
.prose .video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose video { width: 100%; border-radius: var(--r-md); margin: 2em 0; box-shadow: var(--shadow-md); background: #000; }
.prose .table-wrap { overflow-x: auto; margin: 2em 0; border: 1px solid var(--line); border-radius: var(--r-md); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { background: var(--surface-2); font-weight: 700; }
.prose .ql-align-center { text-align: center; } .prose .ql-align-right { text-align: right; } .prose .ql-align-justify { text-align: justify; }
.prose .ql-indent-1 { padding-left: 3em; } .prose .ql-indent-2 { padding-left: 6em; } .prose .ql-indent-3 { padding-left: 9em; }
.prose .ql-size-small { font-size: .8em; } .prose .ql-size-large { font-size: 1.4em; } .prose .ql-size-huge { font-size: 2em; }

/* ---------- pagination ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 56px; }
.pagination a, .pagination span { min-width: 46px; height: 46px; display: inline-grid; place-items: center; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 15px; transition: all .25s var(--ease); }
.pagination a:hover { border-color: var(--accent); transform: translateY(-3px); }
.pagination .current { background: var(--gold); border-color: var(--gold); color: var(--on-accent); }
.pagination .gap { border: 0; background: none; }

/* ---------- toast ---------- */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 9000; display: grid; gap: 12px; width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface); color: var(--text); border: 1px solid var(--line); border-left: 5px solid var(--teal-500); box-shadow: var(--shadow-lg); animation: toastIn .6s var(--ease-spring); font-size: 15px; font-weight: 600; line-height: 1.45; }
.toast.error { border-left-color: #e0534a; }
.toast.success { border-left-color: #2fbf8a; }
.toast i { font-size: 20px; margin-top: 1px; }
.toast.success i { color: #2fbf8a; } .toast.error i { color: #e0534a; }
.toast.out { animation: toastOut .4s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(24px) scale(.94); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }

/* ---------- cookie banner ---------- */
.cookie { position: fixed; left: 20px; bottom: 20px; z-index: 8000; width: min(440px, calc(100vw - 40px)); padding: 22px 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); transform: translateY(150%); opacity: 0; transition: transform .8s var(--ease), opacity .8s; }
.cookie.is-visible { transform: none; opacity: 1; }
.cookie p { font-size: 14.5px; margin: 0 0 16px; color: var(--muted); line-height: 1.6; }
.cookie p b { color: var(--text); }
.cookie .row { display: flex; gap: 10px; }

/* ---------- floating helpers ---------- */
.to-top { position: fixed; right: 20px; bottom: 96px; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-md); display: grid; place-items: center; z-index: 70; opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none; transition: all .4s var(--ease); }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--gold); color: var(--on-accent); }
.cursor-glow { position: fixed; width: 460px; height: 460px; left: 0; top: 0; margin: -230px 0 0 -230px; border-radius: 50%; background: radial-gradient(circle, rgba(244, 196, 48, .10), transparent 62%); pointer-events: none; z-index: 1; transition: opacity .5s; opacity: 0; will-change: transform; }
:root[data-theme="light"] .cursor-glow { display: none; }

/* ---------- Hapee Intelligence chat ---------- */
.chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 2147483000; width: 62px; height: 62px; border-radius: 22px; border: 0; padding: 0; background: var(--teal-700); box-shadow: 0 14px 40px rgba(3, 31, 29, .5), 0 0 0 0 rgba(244, 196, 48, .6); transition: transform .4s var(--ease-spring); animation: fabPulse 3s infinite; overflow: visible; }
.chat-fab img { width: 100%; height: 100%; border-radius: 22px; }
.chat-fab:hover { transform: scale(1.08) rotate(-4deg); }
.chat-fab .dot { position: absolute; top: -4px; right: -4px; width: 18px; height: 18px; border-radius: 50%; background: #2fd18f; border: 3px solid var(--bg); }
.chat-fab .tip { position: absolute; right: 74px; top: 50%; transform: translateY(-50%) translateX(10px); background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-md); padding: 10px 16px; border-radius: 16px; font-size: 14px; font-weight: 700; white-space: nowrap; opacity: 0; pointer-events: none; transition: all .4s var(--ease); }
.chat-fab.show-tip .tip, .chat-fab:hover .tip { opacity: 1; transform: translateY(-50%); }
.chat-fab.is-hidden { transform: scale(0); pointer-events: none; }
@keyframes fabPulse { 0% { box-shadow: 0 14px 40px rgba(3, 31, 29, .5), 0 0 0 0 rgba(244, 196, 48, .55); } 70% { box-shadow: 0 14px 40px rgba(3, 31, 29, .5), 0 0 0 18px rgba(244, 196, 48, 0); } 100% { box-shadow: 0 14px 40px rgba(3, 31, 29, .5), 0 0 0 0 rgba(244, 196, 48, 0); } }

.hchat { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); height: 100%; min-height: 0; color: var(--text); }
.hchat-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: linear-gradient(135deg, var(--teal-700), var(--teal-900)); color: #fff; }
.hchat-head img { width: 44px; height: 44px; border-radius: 14px; }
.hchat-head b { display: block; font: 700 17px var(--font-display); letter-spacing: -.01em; }
.hchat-head small { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #bfe0da; }
.hchat-head small::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #2fd18f; box-shadow: 0 0 0 4px rgba(47, 209, 143, .25); }
.hchat-head .x { margin-left: auto; position: relative; z-index: 2; cursor: pointer; width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; font-size: 18px; }
.hchat-head .x:hover { background: rgba(255, 255, 255, .24); }
.hchat-log { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; background: var(--bg); min-height: 0; }
.hmsg { max-width: 86%; padding: 12px 16px; border-radius: 20px; font-size: 15.5px; line-height: 1.55; animation: msgIn .5s var(--ease-spring); white-space: pre-wrap; word-wrap: break-word; }
.hmsg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.hmsg.user { align-self: flex-end; background: linear-gradient(135deg, #ffd24d, var(--gold)); color: var(--on-accent); font-weight: 600; border-bottom-right-radius: 6px; }
.hmsg a { color: var(--accent-text); text-decoration: underline; font-weight: 700; }
.hmsg.typing { display: inline-flex; gap: 5px; padding: 16px 18px; }
.hmsg.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: bounce 1.1s infinite; }
.hmsg.typing i:nth-child(2) { animation-delay: .15s; } .hmsg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-6px); opacity: 1; } }
@keyframes msgIn { from { opacity: 0; transform: translateY(12px) scale(.96); } }
.hmeals { align-self: flex-start; display: grid; gap: 10px; width: min(92%, 380px); animation: msgIn .6s var(--ease-spring); }
.hmeal { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.hmeal .em { font-size: 34px; width: 56px; height: 56px; display: grid; place-items: center; background: var(--surface-2); border-radius: 16px; flex-shrink: 0; }
.hmeal b { display: block; font: 700 15.5px/1.25 var(--font-display); }
.hmeal small { color: var(--muted); font-size: 12.5px; }
.hchips { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 20px 12px; background: var(--bg); }
.hchips button { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 700; transition: all .25s var(--ease); }
.hchips button:hover { background: var(--gold); border-color: var(--gold); color: var(--on-accent); transform: translateY(-2px); }
.hchat-form { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.hchat-form input { flex: 1; min-width: 0; padding: 14px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text); font: 500 15.5px var(--font-body); outline: none; transition: border-color .2s, box-shadow .2s; }
.hchat-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.hchat-form button { width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--gold); color: var(--on-accent); font-size: 19px; display: grid; place-items: center; transition: transform .3s var(--ease-spring); }
.hchat-form button:hover { transform: scale(1.1) rotate(-12deg); }

.chat-panel { position: fixed; right: 20px; bottom: 20px; z-index: 2147483001; isolation: isolate; width: min(410px, calc(100vw - 24px)); height: min(640px, calc(100vh - 40px)); transform-origin: bottom right; transform: scale(.7) translateY(40px); opacity: 0; visibility: hidden; transition: all .5s var(--ease-spring); }
.chat-panel.is-open { transform: none; opacity: 1; visibility: visible; }
@media (max-width: 520px) { .chat-panel { right: 8px; bottom: 8px; height: calc(100vh - 16px); height: calc(100dvh - 16px); } }

/* ---------- footer ---------- */
.footer { background: var(--teal-950); color: #cfe6e1; position: relative; overflow: hidden; padding-top: 90px; }
.footer::before { content: ''; position: absolute; width: 700px; height: 700px; right: -200px; top: -300px; background: radial-gradient(circle, rgba(244, 196, 48, .12), transparent 65%); pointer-events: none; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 60px; }
.footer .brand { color: #fff; margin-bottom: 18px; }
.footer p { color: #9cc3bc; font-size: 15.5px; max-width: 38ch; }
.footer h4 { color: #fff; font: 700 15px var(--font-body); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 18px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a { color: #9cc3bc; font-size: 15.5px; transition: color .2s, padding .3s var(--ease); display: inline-block; }
.footer ul a:hover { color: var(--gold); padding-left: 6px; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.socials a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .16); color: #fff; transition: all .3s var(--ease-spring); }
.socials a:hover { background: var(--gold); color: var(--teal-800); border-color: var(--gold); transform: translateY(-4px) rotate(8deg); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 26px 0; display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: space-between; font-size: 14px; color: #7fa8a1; }
.footer-bottom b { color: var(--gold); }
.footer-bottom nav { display: flex; gap: 22px; }
.footer-bottom a:hover { color: var(--gold); }
.footer-mega { font: 800 clamp(80px, 21vw, 300px)/.8 var(--font-display); letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .09); text-align: center; user-select: none; margin-bottom: -.1em; white-space: nowrap; overflow: hidden; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; gap: 34px; } }

/* ---------- misc ---------- */
.alert { padding: 14px 18px; border-radius: var(--r-md); font-weight: 600; font-size: 15px; margin-bottom: 18px; border: 1px solid; }
.alert-error { background: rgba(224, 83, 74, .1); border-color: rgba(224, 83, 74, .4); color: #e0534a; }
.alert-success { background: rgba(47, 191, 138, .1); border-color: rgba(47, 191, 138, .4); color: #1f9b6e; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
}
@media print { .header, .footer, .chat-fab, .cookie, .to-top, #preloader { display: none !important; } }
