/* =====================================================================
   Chieftain:Y2K Aqua portal skin
   Hand-written CSS. Blue / white / grey only. Period-correct type.
   ===================================================================== */

/* ---- Design tokens ---- */
:root {
  /* Aqua button gradient */
  --aqua-top: #8FC4F5;
  --aqua-mid: #3B82DB;
  --aqua-bot: #1A5FB8;

  /* Title / header bars */
  --bar-top: #4A8FD8;
  --bar-bot: #2C6BB8;

  /* Blues */
  --blue-deep: #1A4C9C;   /* headings, wordmark */
  --link: #0033CC;        /* classic underlined link */

  /* Brushed grey chrome */
  --chrome-light: #ECEEF1;
  --chrome-dark: #C9CDD3;
  --border-grey: #9AA0A8;

  /* Panels */
  --white: #FFFFFF;
  --tint-1: #EAF2FC;
  --tint-2: #DCE9F9;

  /* Text */
  --ink: #1A1A1A;

  /* Bevel helpers */
  --bevel-hi: rgba(255, 255, 255, 0.85);
  --bevel-lo: rgba(0, 0, 0, 0.25);

  /* Type */
  --serif: Georgia, "Times New Roman", serif;
  --ui: "Lucida Grande", Tahoma, Verdana, sans-serif;

  /* Layout */
  --maxw: 1040px;
  --radius: 10px;
}

/* ---- Reset / base ---- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  /* Faint blue/white vertical pinstripe over a soft brushed wash */
  background-color: var(--tint-1);
  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.55) 0 2px,
      rgba(210, 226, 247, 0.55) 2px 4px
    ),
    linear-gradient(180deg, #F3F8FE 0%, #DCE9F9 100%);
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }

a { color: var(--link); }

h1, h2, h3 { font-family: var(--serif); color: var(--blue-deep); line-height: 1.15; }

/* Visible focus everywhere */
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--white);
  color: var(--link);
  padding: 8px 14px;
  border: 1px solid var(--border-grey);
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* Scroll-reveal. Gated on html.js so no-JS users always see content,
   and switched off entirely when reduced motion is preferred. */
.reveal { opacity: 1; transform: none; }
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  will-change: opacity, transform;
}
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; }
}

/* ---- Shared layout ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* =====================================================================
   Bevel helper:paired light (top/left) + dark (bottom/right) borders
   ===================================================================== */
.bevel {
  border: 1px solid var(--border-grey);
  border-top-color: var(--bevel-hi);
  border-left-color: var(--bevel-hi);
  border-bottom-color: var(--bevel-lo);
  border-right-color: var(--bevel-lo);
}

/* =====================================================================
   Ticker strip:thin "Hot News" announcement bar
   ===================================================================== */
.ticker {
  background: linear-gradient(180deg, #FFF6C9 0%, #FFE89B 100%);
  border-bottom: 1px solid #D9B84A;
  color: #5a4a12;
  font-size: 13px;
}
.ticker .wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 5px;
  padding-bottom: 5px;
}
.ticker .badge {
  flex: none;
  background: linear-gradient(180deg, #E5453B 0%, #B91D14 100%);
  color: #fff;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 9px;
  border: 1px solid #8f140d;
}
.ticker p { margin: 0; }

/* Auto-scrolling marquee (classic Y2K). Pauses on hover; static when
   reduced motion is preferred. Two copies make the loop seamless. */
.ticker .marquee { flex: 1 1 auto; overflow: hidden; }
.ticker .marquee-track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: ticker-scroll 28s linear infinite;
}
.ticker .marquee-track p { padding-right: 3rem; }
.ticker:hover .marquee-track { animation-play-state: paused; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =====================================================================
   Header + tab-strip nav
   ===================================================================== */
.site-header {
  background: linear-gradient(180deg, var(--chrome-light) 0%, var(--chrome-dark) 100%);
  border-bottom: 1px solid var(--border-grey);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  position: relative;
}

.brand-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-weight: bold;
  font-size: 17px;
  color: var(--blue-deep);
  text-decoration: none;
  white-space: nowrap;
}
.brand-mini img { width: 26px; height: 26px; }

/* Menu dropdown toggle (always shown) */
.nav-toggle {
  display: inline-flex;
  margin-left: auto;
  font: inherit;
  font-weight: bold;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, var(--chrome-light) 0%, var(--chrome-dark) 100%);
  color: var(--ink);
  padding: 8px 14px;
  cursor: pointer;
  border: 1px solid var(--border-grey);
  border-top-color: var(--bevel-hi);
  border-left-color: var(--bevel-hi);
  border-radius: 8px;
}
.nav-toggle::after { content: "\25BE"; font-size: 11px; line-height: 1; }
.nav-toggle .bars { display: none; }

/* Dropdown menu (opens under the Menu button) */
#primary-nav { display: contents; }
.tabs {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 16px;
  z-index: 60;
  flex-direction: column;
  min-width: 190px;
  list-style: none;
  margin: 0;
  padding: 6px;
  gap: 2px;
  background: linear-gradient(180deg, #ffffff 0%, var(--chrome-light) 100%);
  border: 1px solid var(--border-grey);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(26, 76, 156, 0.24);
}
.tabs.open { display: flex; }
.tabs a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 7px;
  font-family: var(--ui);
  font-weight: bold;
  font-size: 14px;
  text-decoration: none;
  color: var(--blue-deep);
}
.tabs a:hover { background: var(--tint-1); }
.tabs a.is-active,
.tabs a[aria-current="page"] { background: var(--tint-2); }

/* =====================================================================
   Aqua button:pill, vertical blue gradient + top gloss
   ===================================================================== */
.aqua-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--ui);
  font-weight: bold;
  font-size: 14px;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  padding: 11px 22px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--aqua-bot);
  background: linear-gradient(180deg, var(--aqua-top) 0%, var(--aqua-mid) 50%, var(--aqua-bot) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 1px 2px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  overflow: hidden;
  transition: filter 0.12s ease;
}
/* White gloss highlight on the top ~50% */
.aqua-btn::before {
  content: "";
  position: absolute;
  left: 3px; right: 3px; top: 2px;
  height: 46%;
  border-radius: 999px 999px 60% 60% / 999px 999px 100% 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}
.aqua-btn span { position: relative; z-index: 1; }
.aqua-btn:hover { filter: brightness(1.08); }
.aqua-btn:active { filter: brightness(0.95); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35); }

/* Gloss sweep across the button on hover */
.aqua-btn::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%);
  transform: skewX(-18deg);
  opacity: 0;
  pointer-events: none;
}
.aqua-btn:hover::after { animation: btn-shine 0.7s ease; }
@keyframes btn-shine {
  0%   { left: -60%; opacity: 0; }
  18%  { opacity: 1; }
  100% { left: 120%; opacity: 0; }
}

.aqua-btn.secondary {
  color: var(--blue-deep);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  border-color: var(--border-grey);
  background: linear-gradient(180deg, #FFFFFF 0%, #E3ECF8 50%, #CFDDF1 100%);
}
.aqua-btn.secondary::before { background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 100%); }

/* =====================================================================
   Portal panel:gradient title bar + beveled body
   ===================================================================== */
.panel {
  background: var(--white);
  border: 1px solid var(--border-grey);
  border-radius: var(--radius);
  box-shadow: 0 2px 6px rgba(26, 76, 156, 0.16);
  margin: 0 0 26px;
  overflow: hidden;
}
.panel > .panel-bar {
  background: linear-gradient(180deg, var(--bar-top) 0%, var(--bar-bot) 100%);
  color: #fff;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: bold;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
  padding: 9px 16px;
  border-bottom: 1px solid var(--bar-bot);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  gap: 9px;
}
.panel > .panel-bar .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #cfe6ff, #6aa6e6);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6);
  flex: none;
}
.panel > .panel-body { padding: 18px 18px 20px; }

/* Tinted variant for alternating rhythm */
.panel.tint > .panel-body { background: var(--tint-1); }

/* A panel that fuses to the active tab visually */
section { scroll-margin-top: 12px; }

.lead { font-size: 16px; margin-top: 0; }
.muted { color: #4a5568; }

/* Fact chips (class details) */
.facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
}
.facts li {
  font-size: 13px;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--tint-2) 100%);
  border: 1px solid var(--border-grey);
  border-radius: 8px;
  padding: 6px 11px;
  box-shadow: inset 0 1px 0 var(--bevel-hi);
}
.facts strong { color: var(--blue-deep); margin-right: 6px; }

/* =====================================================================
   Hero:faux OS window
   ===================================================================== */
.hero { padding: 26px 0 8px; }

/* Landing (home) page: center the splash window vertically */
main.landing { display: flex; align-items: center; min-height: 74vh; }
main.landing .hero { width: 100%; padding: 36px 0; }
main.landing .window-body { padding: 64px 28px 70px; }
main.landing .wordmark { font-size: clamp(46px, 8vw, 84px); }
main.landing .tagline { font-size: clamp(18px, 2.8vw, 24px); max-width: 30ch; }
main.landing .tagline-sub { font-size: 15.5px; max-width: 52ch; }
.window {
  background: var(--white);
  border: 1px solid var(--border-grey);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(26, 76, 156, 0.22);
  overflow: hidden;
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #E9EEF4 0%, #C7CDD6 100%);
  border-bottom: 1px solid var(--border-grey);
  padding: 8px 12px;
  box-shadow: inset 0 1px 0 var(--bevel-hi);
}
.traffic { display: flex; gap: 7px; }
.traffic i {
  width: 13px; height: 13px; border-radius: 50%;
  display: inline-block;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.7), 0 0 0 1px rgba(0,0,0,0.18);
}
.traffic .r { background: radial-gradient(circle at 35% 30%, #ff9b95, #e5453b); }
.traffic .y { background: radial-gradient(circle at 35% 30%, #ffe08a, #f5b52a); }
.traffic .g { background: radial-gradient(circle at 35% 30%, #a6f0a0, #28c940); }
.window-title {
  flex: 1;
  text-align: center;
  font-size: 12.5px;
  color: #3a4250;
  font-family: var(--ui);
  letter-spacing: 0.02em;
}
.window-body {
  text-align: center;
  padding: 40px 22px 44px;
  background:
    radial-gradient(120% 90% at 50% -20%, #FFFFFF 0%, #EAF2FC 60%, #DCE9F9 100%);
}
.wordmark {
  font-family: var(--serif);
  font-weight: bold;
  color: var(--blue-deep);
  font-size: clamp(34px, 6vw, 58px);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.tagline {
  font-size: clamp(16px, 2.4vw, 21px);
  color: #243044;
  margin: 0 auto 10px;
  max-width: 38ch;
}
.tagline-sub {
  font-size: 14.5px;
  color: #3a4658;
  max-width: 48ch;
  margin: 0 auto 22px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.cta-row.cta-left { justify-content: flex-start; margin-top: 4px; }

/* =====================================================================
   Services grid
   ===================================================================== */
.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--tint-2) 100%);
  border: 1px solid var(--border-grey);
  border-radius: 9px;
  box-shadow: inset 0 1px 0 var(--bevel-hi), 0 1px 2px rgba(0,0,0,0.08);
  padding: 14px 14px 12px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 var(--bevel-hi), 0 7px 16px rgba(26, 76, 156, 0.22);
}
/* subtle gloss on each glossy sub-panel */
.card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 38%;
  background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0));
  pointer-events: none;
}
.card > * { position: relative; z-index: 1; }
.card h3 {
  margin: 2px 0 6px;
  font-size: 16px;
  color: var(--blue-deep);
}
.card .feat {
  display: inline-block;
  font-family: var(--ui);
  font-size: 10.5px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: linear-gradient(180deg, #E5453B 0%, #B91D14 100%);
  border: 1px solid #8f140d;
  border-radius: 8px;
  padding: 1px 7px;
  margin-bottom: 6px;
}
.card .feat.blue {
  background: linear-gradient(180deg, var(--aqua-top) 0%, var(--aqua-bot) 100%);
  border-color: var(--aqua-bot);
}
.card p { margin: 0 0 12px; font-size: 13.5px; color: #2a3340; }
.card .ask {
  margin-top: auto;
  font-size: 13px;
  font-weight: bold;
  text-decoration: none;
  color: var(--link);
}
.card .ask:hover { text-decoration: underline; }

/* =====================================================================
   Forms (Netlify)
   ===================================================================== */
.form { margin: 0; }
.field { margin-bottom: 13px; }
.field label {
  display: block;
  font-weight: bold;
  font-size: 13px;
  color: #1f2a3a;
  margin-bottom: 4px;
}
.field input,
.field textarea {
  width: 100%;
  font-family: var(--ui);
  font-size: 15px;
  color: var(--ink);
  padding: 9px 10px;
  background: #fff;
  border: 1px solid var(--border-grey);
  border-top-color: #b6bcc4;
  border-radius: 6px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.12);
}
.field input:focus,
.field textarea:focus { border-color: var(--aqua-mid); }
.field textarea { min-height: 120px; resize: vertical; }

/* Honeypot:hide from real users, keep in DOM for Netlify */
.hp { position: absolute; left: -5000px; }

.form-note { font-size: 12.5px; color: #4a5568; margin: 6px 0 0; }

.inline-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.inline-form .field { flex: 1 1 200px; margin-bottom: 0; }

/* Direct contact line */
.direct {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--tint-2);
  font-size: 14px;
}

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer {
  background: linear-gradient(180deg, var(--chrome-light) 0%, var(--chrome-dark) 100%);
  border-top: 1px solid var(--border-grey);
  margin-top: 14px;
  padding: 22px 0;
  font-size: 13px;
  color: #3a4250;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  align-items: center;
  justify-content: space-between;
}
.site-footer .brand-mini { font-size: 15px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 14px; }
.site-footer a { color: var(--link); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .copy { width: 100%; color: #4a5568; }

/* ===== Magnifying dock (footer) ===== */
.dock-mount { width: 100%; display: flex; justify-content: center; margin-bottom: 8px; }
.dock {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 10px 18px 12px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(201, 205, 211, 0.8) 100%);
  border: 1px solid var(--border-grey);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 6px 18px rgba(26, 76, 156, 0.18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.dock-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}
.dock-tile {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(180deg, var(--aqua-top) 0%, var(--aqua-mid) 52%, var(--aqua-bot) 100%);
  border: 1px solid var(--aqua-bot);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 2px 5px rgba(0, 0, 0, 0.28);
  transform-origin: bottom center;
  transition: transform 0.12s ease;
  position: relative;
  overflow: hidden;
}
.dock-tile::before {
  content: "";
  position: absolute;
  left: 3px; right: 3px; top: 2px;
  height: 46%;
  border-radius: 14px 14px 60% 60% / 14px 14px 100% 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.dock-tile svg { width: 30px; height: 30px; position: relative; z-index: 1; }

/* tooltip */
.dock-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(0.85);
  background: rgba(26, 36, 52, 0.92);
  color: #fff;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 7px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.dock-item:hover .dock-tip,
.dock-item:focus-visible .dock-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* active indicator dot */
.dock-dot {
  width: 4px; height: 4px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--blue-deep);
  opacity: 0;
}
.dock-item.is-active .dock-dot { opacity: 0.8; }

@media (prefers-reduced-motion: reduce) {
  .dock-tile { transition: none; }
}
/* On small screens, let the dock wrap and stay tappable */
@media (max-width: 560px) {
  .dock { flex-wrap: wrap; justify-content: center; gap: 10px; border-radius: 20px; }
  .dock-tile { width: 50px; height: 50px; }
  .dock-tile svg { width: 26px; height: 26px; }
}

/* ===== "Ask Chieftain" demo chat ===== */
.chat-log {
  height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border-grey);
  border-radius: 8px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.14);
  padding: 12px;
  margin-bottom: 10px;
}
.msg { margin: 0 0 12px; max-width: 88%; }
.msg .who {
  display: block;
  font-size: 11px;
  font-weight: bold;
  color: var(--blue-deep);
  margin-bottom: 3px;
}
.msg p {
  margin: 0;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  border: 1px solid var(--border-grey);
  box-shadow: inset 0 1px 0 var(--bevel-hi);
  white-space: pre-wrap;
}
.msg.bot { margin-right: auto; }
.msg.bot p {
  background: linear-gradient(180deg, #fff 0%, var(--tint-1) 100%);
  color: var(--ink);
  border-bottom-left-radius: 3px;
}
.msg.user { margin-left: auto; text-align: right; }
.msg.user .who { color: #2c6bb8; }
.msg.user p {
  background: linear-gradient(180deg, #DCEBFB 0%, #BCD8F7 100%);
  color: #14233a;
  border-bottom-right-radius: 3px;
  text-align: left;
}
.msg.typing p { color: #6b7280; letter-spacing: 2px; animation: chat-blink 1s steps(1) infinite; }
@keyframes chat-blink { 50% { opacity: 0.4; } }

.chat-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip {
  font-family: var(--ui);
  font-size: 12.5px;
  color: var(--blue-deep);
  background: linear-gradient(180deg, #fff 0%, #e3ecf8 100%);
  border: 1px solid var(--border-grey);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 var(--bevel-hi);
}
.chip:hover { background: linear-gradient(180deg, #fff 0%, #d6e4f6 100%); }

.chat-input { display: flex; gap: 8px; align-items: stretch; }
.chat-input input {
  flex: 1;
  font-family: var(--ui);
  font-size: 15px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--border-grey);
  border-top-color: #b6bcc4;
  border-radius: 8px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
}
.chat-input input:focus { border-color: var(--aqua-mid); }
.chat-input .aqua-btn { flex: 0 0 auto; }
.chat-input input:disabled, .aqua-btn:disabled { opacity: 0.6; cursor: default; }
@media (max-width: 760px) {
  .chat-input { flex-wrap: wrap; }
  .chat-input .aqua-btn { width: 100%; }
}

/* Cursor sparkle trail (added by JS). Decorative only. */
.sparkle {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #ffffff 0%, #8FC4F5 55%, rgba(143, 196, 245, 0) 70%);
  will-change: transform, opacity;
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 760px) {
  .window-body { padding: 30px 16px 34px; }
  .cta-row .aqua-btn { width: 100%; }
}

/* =====================================================================
   Virtual pet game — "Pocket Pals"
   Aqua handheld device with an LCD screen. Tokens only, no new palette.
   ===================================================================== */
.pet-game {
  max-width: 460px;
  margin: 18px auto 4px;
  text-align: center;
}

/* ---- Pet chooser (segmented toggle) ---- */
.pet-switch {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}
.pet-switch button {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--ui);
  font-weight: bold;
  font-size: 14px;
  color: var(--blue-deep);
  padding: 9px 12px;
  min-height: 44px;
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid var(--border-grey);
  background: linear-gradient(180deg, #FFFFFF 0%, #E3ECF8 50%, #CFDDF1 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: filter 0.12s ease;
}
.pet-switch button .switch-emoji { font-size: 18px; }
.pet-switch button .switch-sub { font-weight: normal; color: #4a5568; font-size: 12px; }
.pet-switch button:hover { filter: brightness(1.03); }
.pet-switch button.is-active {
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  border-color: var(--aqua-bot);
  background: linear-gradient(180deg, var(--aqua-top) 0%, var(--aqua-mid) 50%, var(--aqua-bot) 100%);
}
.pet-switch button.is-active .switch-sub { color: rgba(255, 255, 255, 0.85); }

/* ---- Tamagotchi egg shell ---- */
.pet-egg {
  position: relative;
  width: 300px;
  max-width: 100%;
  aspect-ratio: 300 / 340;
  margin: 4px auto 8px;
  border-radius: 50% 50% 50% 50% / 42% 42% 58% 58%;
  background: radial-gradient(120% 95% at 50% 6%, #6ad9ef 0%, #2bbfe0 46%, #17a3ca 100%);
  border: 4px solid #163a4c;
  box-shadow:
    inset 0 6px 14px rgba(255, 255, 255, 0.35),
    inset 0 -12px 24px rgba(0, 60, 90, 0.35),
    0 10px 22px rgba(20, 60, 90, 0.32);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.egg-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.95;
}
.egg-label {
  position: relative;
  margin-top: 7%;
  font-family: var(--serif);
  font-style: italic;
  font-weight: bold;
  font-size: 17px;
  letter-spacing: 0.02em;
  color: #ff2e88;
  -webkit-text-stroke: 0.6px #7a123f;
  text-shadow: 1px 1px 0 #fff, 2px 2px 0 rgba(0, 0, 0, 0.15);
}

/* Magenta bezel around the LCD */
.lcd-bezel {
  position: relative;
  margin-top: 5%;
  width: 63%;
  padding: 9px;
  border-radius: 15px 15px 20px 20px;
  background: linear-gradient(180deg, #ff4fa3 0%, #d81f86 100%);
  border: 3px solid #7a123f;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.5), inset 0 -3px 6px rgba(0, 0, 0, 0.25);
}

/* The green dot-matrix LCD */
.lcd {
  position: relative;
  border-radius: 8px;
  padding: 6px 7px 5px;
  background:
    repeating-linear-gradient(0deg, rgba(60, 70, 20, 0.06) 0 2px, rgba(60, 70, 20, 0) 2px 4px),
    linear-gradient(180deg, #d8df70 0%, #c2ce50 100%);
  border: 2px solid #6d7328;
  box-shadow: inset 0 2px 6px rgba(60, 70, 20, 0.45);
}

.pet-screen {
  position: relative;
  height: 118px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pet-svg {
  width: 112px;
  height: 112px;
  transform-origin: 50% 100%;
  image-rendering: pixelated;
}
html.js .pet-svg { animation: pet-bob 1.1s steps(2) infinite; }
html.js .pet-screen[data-mood="sleeping"] .pet-svg { animation: pet-breathe 4s ease-in-out infinite; }
html.js .pet-svg.react { animation: pet-react 0.45s ease; }
.pet-screen[data-mood="sleeping"] { filter: brightness(0.94); }

/* LCD icon rows — dark olive glyphs on the green screen, like the real toy */
.lcd-icons {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
  color: #454a1c;
}
.lcd-icons.top { margin-bottom: 3px; }
.lcd-icons.bottom { margin-top: 3px; }
.lcd-icon {
  width: 15px;
  height: 15px;
  opacity: 0.7;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.lcd-icon svg { width: 100%; height: 100%; display: block; }
.lcd-icon.hit, .lcd-icon.on { opacity: 1; transform: scale(1.2); }

/* Decorative front buttons (A / B / C) */
.egg-buttons {
  position: relative;
  margin-top: 5%;
  display: flex;
  gap: 16px;
}
.egg-buttons span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.6), #d81f86);
  border: 2px solid #7a123f;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 2px 3px rgba(0, 0, 0, 0.25);
}

/* Floating reaction emoji */
.pet-pop {
  position: absolute;
  left: 50%;
  top: 40%;
  font-size: 26px;
  transform: translateX(-50%);
  pointer-events: none;
}
html.js .pet-pop { animation: pet-pop-float 0.9s ease-out forwards; }

/* ---- Status line ---- */
.pet-status {
  margin: 12px 4px 4px;
  min-height: 1.4em;
  font-family: var(--ui);
  font-size: 14px;
  font-weight: bold;
  color: var(--blue-deep);
}

/* ---- Stat meters ---- */
.pet-meters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  padding: 6px 4px 2px;
  text-align: left;
}
.meter {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ink);
}
.meter-label { white-space: nowrap; }
.meter-track {
  height: 12px;
  border-radius: 999px;
  background: #f0f2f5;
  border: 1px solid var(--border-grey);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.meter-fill {
  display: block;
  height: 100%;
  width: 80%;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--aqua-top) 0%, var(--aqua-mid) 55%, var(--aqua-bot) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: width 0.35s ease, background 0.3s ease;
}
.meter-val { font-variant-numeric: tabular-nums; color: #4a5568; min-width: 2ch; text-align: right; }
.meter.low .meter-fill { background: linear-gradient(180deg, #F19B98 0%, #E5453B 55%, #B91D14 100%); }
.meter.low .meter-label { color: #B91D14; }

/* ---- Action buttons ---- */
.pet-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.pet-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-family: var(--ui);
  font-weight: bold;
  font-size: 12px;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  padding: 9px 4px;
  min-height: 56px;
  cursor: pointer;
  border-radius: 12px;
  border: 1px solid var(--aqua-bot);
  background: linear-gradient(180deg, var(--aqua-top) 0%, var(--aqua-mid) 50%, var(--aqua-bot) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: filter 0.12s ease;
}
.pet-btn .btn-emoji { font-size: 20px; text-shadow: none; }
.pet-btn:hover { filter: brightness(1.08); }
.pet-btn:active { filter: brightness(0.95); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35); }
.pet-btn:disabled {
  cursor: default;
  filter: none;
  opacity: 0.5;
  color: #6b7280;
  text-shadow: none;
  border-color: var(--border-grey);
  background: linear-gradient(180deg, #FFFFFF 0%, #E3ECF8 100%);
}
.pet-btn[data-action="sleep"][aria-pressed="true"] {
  border-color: #3f3a63;
  background: linear-gradient(180deg, #6a74a8 0%, #3f4677 50%, #2a2f57 100%);
}

.pet-tip { font-size: 12px; margin: 14px 4px 0; }

/* ---- Animations ---- */
@keyframes pet-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
@keyframes pet-breathe {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(0.97); }
}
@keyframes pet-react {
  0%   { transform: translateY(0) scale(1); }
  35%  { transform: translateY(-12px) scale(1.06, 0.94); }
  70%  { transform: translateY(0) scale(0.96, 1.04); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes pet-pop-float {
  0%   { opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.6); }
  25%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-46px) scale(1.1); }
}

@media (max-width: 460px) {
  .pet-actions { gap: 6px; }
  .pet-btn { font-size: 11px; padding: 8px 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html.js .pet-svg,
  html.js .pet-screen[data-mood="sleeping"] .pet-svg { animation: none; }
  .meter-fill { transition: none; }
}
