/* Glass + 3D interactive elements, themed by the tokens in tirupati.css. CSS only; transform and opacity animate, shadows are static. */
.btn, .card, .chip, .subnav a, .mod, .nav-toggle, .theme-btn, .lang { position: relative; }
.btn, .card, .chip, .subnav a, .mod, .wa-fab, .nav-toggle, .theme-btn { isolation: isolate; --lx: 50%; --ly: 0%; }
.btn::before, .card::before, .chip::before, .subnav a::before, .mod::before, .wa-fab::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .18s ease; z-index: 1;
  background: radial-gradient(140px 90px at var(--lx) var(--ly), rgba(255,255,255,.55), rgba(255,255,255,0) 70%); }
.card::before, .mod::before { background: radial-gradient(220px 160px at var(--lx) var(--ly), rgba(var(--accent-rgb), .10), rgba(var(--accent-rgb), 0) 70%); }
.btn:hover::before, .btn:focus-visible::before, .card:hover::before, .chip:hover::before, .subnav a:hover::before, .mod:hover::before, .wa-fab:hover::before { opacity: 1; }

/* Glass buttons: a translucent face, a bright rim, a top highlight and a solid lower edge for depth. */
.btn { transition: transform .14s ease; border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(10px) saturate(1.5); backdrop-filter: blur(10px) saturate(1.5); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(3px); transition-duration: .05s; }

.btn-primary { color: var(--on-accent) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.4) 0%, rgba(255,255,255,0) 52%), linear-gradient(180deg, rgba(var(--accent-rgb), calc(.55 + .43 * var(--go, 1))), rgba(var(--accent-rgb), calc(.5 + .42 * var(--go, 1))));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -10px 18px rgba(0,0,0,.10), 0 4px 0 var(--accent-edge), 0 14px 24px rgba(var(--accent-rgb), .32); }
.btn-primary:hover { background: linear-gradient(180deg, rgba(255,255,255,.5) 0%, rgba(255,255,255,0) 52%), linear-gradient(180deg, rgba(var(--accent-rgb), 1), rgba(var(--accent-rgb), .95)); }
.btn-primary:active { box-shadow: inset 0 2px 6px rgba(0,0,0,.3), 0 1px 0 var(--accent-edge); }

.btn-ghost { color: var(--navy) !important;
  background: linear-gradient(180deg, var(--gt), var(--gb));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 0 0 1px var(--glass-ring), 0 4px 0 var(--glass-edge), 0 12px 18px rgba(0,0,0,.07); }
.btn-ghost:active { box-shadow: inset 0 2px 5px rgba(0,0,0,.18), 0 0 0 1px var(--glass-ring), 0 1px 0 var(--glass-edge); }

.btn-light { color: var(--on-light) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(255,255,255,.78));
  box-shadow: inset 0 1px 0 #fff, 0 4px 0 rgba(0,0,0,.28), 0 12px 20px rgba(0,0,0,.22); }
.btn-light:active { box-shadow: inset 0 2px 4px rgba(0,0,0,.2), 0 1px 0 rgba(0,0,0,.28); }

.btn-outline-light { color: var(--cta-text) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.26), rgba(255,255,255,.08)); border-color: rgba(255,255,255,.65);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 4px 0 rgba(0,0,0,.25), 0 10px 16px rgba(0,0,0,.18); }
.btn-outline-light:active { box-shadow: inset 0 2px 4px rgba(0,0,0,.25), 0 1px 0 rgba(0,0,0,.25); }

/* Cards and tiles: solid surface with a raised edge */
.card, .mod { transition: transform .18s ease, box-shadow .18s ease; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 3px 0 var(--glass-edge), 0 10px 18px rgba(0,0,0,.06); }
.card:hover { transform: translateY(-5px); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 3px 0 var(--glass-edge), 0 18px 28px rgba(0,0,0,.14); }
.mod:hover { transform: translateY(-3px); }
.card:active { transform: translateY(-1px); }

/* Small glass controls */
.chip, .subnav a, .lang, .nav-toggle, .theme-btn { background: linear-gradient(180deg, var(--gt), var(--gb)); border-color: var(--glass-ring); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.chip, .subnav a { transition: transform .14s ease; box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 2px 0 var(--glass-edge); }
.chip:hover, .subnav a:hover { transform: translateY(-1px); }
.subnav a[aria-current="page"] { background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0)), var(--deep); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 2px 0 rgba(0,0,0,.35); }
.lang { box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 2px 0 var(--glass-edge); }
.lang a { color: var(--navy); }
.lang a[aria-current="true"] { color: #fff; }
.nav-toggle, .theme-btn { box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 3px 0 var(--glass-edge); transition: transform .12s ease; }
.nav-toggle:active, .theme-btn:active { transform: translateY(2px); box-shadow: none; }

/* Navigation, WhatsApp, forms */
.nav a { transition: background .15s ease, transform .14s ease; }
.nav a:hover { transform: translateY(-1px); }
.wa-fab { background: radial-gradient(circle at 35% 28%, #5af08d, #25d366 55%, #17a34a); box-shadow: inset 0 2px 3px rgba(255,255,255,.55), inset 0 -4px 6px rgba(0,0,0,.15), 0 5px 0 #11803a, 0 14px 22px rgba(0,0,0,.25); transition: transform .14s ease; }
.wa-fab:hover { transform: translateY(-3px) scale(1.04); }
.wa-fab:active { transform: translateY(3px); box-shadow: inset 0 3px 6px rgba(0,0,0,.25), 0 1px 0 #11803a; }
.field input, .field select, .field textarea, .nl input[type=email] { color: var(--ink); box-shadow: inset 0 2px 3px rgba(0,0,0,.07); transition: box-shadow .15s ease, border-color .15s ease; }
.field input:focus, .field select:focus, .field textarea:focus { box-shadow: inset 0 2px 3px rgba(0,0,0,.05), 0 0 0 4px rgba(var(--accent-rgb), .2); }
.faq details[open] { box-shadow: 0 3px 0 var(--glass-edge), 0 12px 20px rgba(0,0,0,.08); }
.intro-skip-btn { background: linear-gradient(180deg, var(--gt), var(--gb)); color: var(--navy); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 3px 0 var(--glass-edge); }
.intro-skip-btn:active { transform: translateY(2px); box-shadow: none; }
.avatar { color: var(--on-accent); }

/* Theme switcher */
.theme { position: relative; }
.theme-btn { width: 44px; height: 44px; border: 1px solid var(--glass-ring); border-radius: 999px; cursor: pointer; display: inline-grid; place-items: center; color: var(--navy); }
.theme-btn svg { width: 22px; height: 22px; }
.theme-pop { position: absolute; right: 0; top: calc(100% + 10px); z-index: 80; min-width: 190px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); display: grid; gap: 4px; }
.theme-pop[hidden] { display: none; }
.theme-pop button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.theme-pop button:hover { background: var(--bg-alt); }
.theme-pop button[aria-pressed="true"] { border-color: var(--link); background: var(--blue-soft); }
.theme-pop i { width: 22px; height: 22px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 2px 3px rgba(255,255,255,.55), inset 0 -3px 5px rgba(0,0,0,.2), 0 0 0 2px var(--surface), 0 0 0 3px var(--line); flex: none; }

@media (hover: none) { .btn::before, .card::before, .chip::before, .subnav a::before, .mod::before, .wa-fab::before { display: none; } .btn:hover, .card:hover, .mod:hover, .chip:hover, .subnav a:hover, .wa-fab:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) { .btn, .card, .mod, .chip, .subnav a, .wa-fab, .nav a, .nav-toggle, .theme-btn { transition: none !important; } .btn:hover, .card:hover, .mod:hover, .wa-fab:hover { transform: none; } }
@media (prefers-reduced-transparency: reduce) { .btn, .chip, .subnav a, .lang, .nav-toggle, .theme-btn { -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* Website assistant */
.ai-fab { position: fixed; left: 16px; bottom: 16px; z-index: 60; min-height: 52px; padding: 0 18px; }
.ai-fab span { max-width: 9.5em; line-height: 1.15; text-align: left; }
.ai-panel { position: fixed; left: 16px; bottom: 84px; z-index: 70; width: min(390px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 110px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.ai-panel[hidden] { display: none; }
.ai-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--deep); color: #fff; }
.ai-close { background: transparent; border: 0; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; min-width: 44px; min-height: 44px; }
.ai-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.ai-msg { max-width: 88%; padding: 10px 12px; border-radius: 14px; font-size: .94rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-msg.bot { background: var(--bg-alt); color: var(--ink); align-self: flex-start; border-bottom-left-radius: 4px; }
.ai-msg.user { background: rgba(var(--accent-rgb), .95); color: var(--on-accent); align-self: flex-end; border-bottom-right-radius: 4px; }
.ai-msg.wait { opacity: .7; font-style: italic; }
.ai-link { font-weight: 700; text-decoration: underline; color: var(--link); }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.ai-chips[hidden], .ai-actions[hidden], .ai-consent[hidden] { display: none; }
.ai-chips .chip { font-size: .82rem; cursor: pointer; font-family: inherit; color: var(--navy); }
.ai-actions { display: flex; gap: 8px; padding: 0 12px 10px; flex-wrap: wrap; }
.ai-actions .btn { min-height: 44px; flex: 1; font-size: .9rem; }
.ai-note { margin: 0; padding: 6px 12px; font-size: .75rem; color: var(--muted); border-top: 1px solid var(--line); }
.ai-form { padding: 8px 12px 12px; display: grid; gap: 8px; }
.ai-consent { font-size: .8rem; }
.ai-input { display: flex; gap: 8px; }
.ai-input input { flex: 1; min-height: 46px; padding: 8px 12px; border: 1px solid var(--field-border); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; }
.ai-input .btn { min-height: 46px; padding: 0 16px; }
@media (max-width: 480px) { .ai-panel { left: 8px; right: 8px; bottom: 76px; width: auto; max-height: calc(100vh - 96px); } .ai-fab span { display: none; } .ai-fab { width: 52px; padding: 0; border-radius: 50%; } }
@media (prefers-reduced-motion: reduce) { .ai-fab { transition: none; } }

/* Glass opacity control (theme menu slider). --go is 0.4 to 1. */
.theme-pop .glass-ctl { display: block; padding: 10px 12px 6px; border-top: 1px solid var(--line); margin-top: 6px; font-size: .85rem; color: var(--muted); }
.theme-pop .glass-ctl input[type="range"] { width: 100%; min-height: 28px; accent-color: var(--blue); }
.theme-pop .glass-ctl output { float: right; font-variant-numeric: tabular-nums; }

/* Tirupati 3D logo as the assistant / help icon */
.ai-fab { gap: 8px; align-items: center; }
.ai-fab .ai-logo { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }
.ai-head { gap: 8px; justify-content: flex-start; }
.ai-head .ai-close { margin-left: auto; }
.ai-head .ai-logo { width: 28px; height: 28px; object-fit: contain; }
@media (max-width: 480px) { .ai-fab { justify-content: center; } }
