/* ============================================================
   AnchorLink Tech — Main Stylesheet
   Brand direction: navy, teal, silver, white, circuit-line detail
   ============================================================ */

:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #eef5f8;
  --text: #10213f;
  --muted: #5f6f82;
  --navy: #07184a;
  --navy-2: #0b255f;
  --teal: #2f7f99;
  --teal-light: #5aafc4;
  --silver: #8b97a5;
  --border: #dce6ee;
  --shadow: rgba(7, 24, 74, 0.12);
  --shadow-strong: rgba(7, 24, 74, 0.24);
  --chat-bg: #ffffff;
  --chat-bubble-bot: #edf4f7;
  --chat-bubble-user: #2f7f99;
  --chat-text: #10213f;
}

body.dark-mode {
  --bg: #07111f;
  --surface: #0d1b2f;
  --surface-soft: #10213f;
  --text: #e9f2f7;
  --muted: #aebdca;
  --border: #1f3857;
  --shadow: rgba(0, 0, 0, 0.4);
  --shadow-strong: rgba(0, 0, 0, 0.55);
  --chat-bg: #0d1b2f;
  --chat-bubble-bot: #132b45;
  --chat-text: #e9f2f7;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 10%, rgba(90, 175, 196, 0.16), transparent 28%),
    radial-gradient(circle at 90% 6%, rgba(7, 24, 74, 0.10), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 48%, #eef5f8 100%);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  transition: background-color 0.3s, color 0.3s;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto auto 4% -6%;
  width: 48vw;
  height: 48vw;
  pointer-events: none;
  opacity: 0.18;
  background:
    linear-gradient(90deg, transparent 49%, var(--teal) 50%, transparent 51%) 0 0/80px 80px,
    linear-gradient(0deg, transparent 49%, var(--silver) 50%, transparent 51%) 0 0/80px 80px;
  mask-image: radial-gradient(circle, #000 0%, transparent 68%);
  z-index: -1;
}

body::after {
  inset: 5% -12% auto auto;
  transform: rotate(22deg);
  opacity: 0.13;
}

a { color: inherit; text-decoration: none; }

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 5vw, 64px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(220, 230, 238, 0.9);
  box-shadow: 0 8px 30px var(--shadow);
  backdrop-filter: blur(14px);
}

body.dark-mode header { background: rgba(7, 17, 31, 0.88); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand img {
  width: 58px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(7, 24, 74, 0.18));
}

.brand-copy { display: grid; line-height: 1; }
.brand-copy strong {
  font-family: 'Rajdhani', 'Inter', sans-serif;
  font-size: 1.55rem;
  letter-spacing: 0.01em;
  color: var(--teal);
}
.brand-copy strong span { color: var(--navy); }
body.dark-mode .brand-copy strong span { color: #dcefff; }
.brand-copy small {
  margin-top: 4px;
  color: var(--silver);
  letter-spacing: 0.55em;
  font-weight: 800;
  font-size: 0.64rem;
}

.header-right { display: flex; align-items: center; gap: 12px; }
nav { display: flex; align-items: center; gap: 8px; }
nav a {
  padding: 9px 12px;
  color: var(--navy);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  transition: 0.2s ease;
}
body.dark-mode nav a { color: #dcefff; }
nav a:hover,
nav a.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  box-shadow: 0 8px 18px rgba(47, 127, 153, 0.24);
}

.dark-toggle,
.hamburger,
button,
.btn {
  font: inherit;
}

.dark-toggle {
  border: 1px solid var(--teal-light);
  background: var(--surface);
  color: var(--teal);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}
.dark-toggle:hover { background: var(--teal); color: #fff; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span { width: 25px; height: 3px; background: var(--navy); border-radius: 3px; transition: 0.3s; }
body.dark-mode .hamburger span { background: #e9f2f7; }
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(290px, 0.9fr);
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
  margin: clamp(24px, 5vw, 56px) auto 28px;
  width: min(1120px, calc(100% - 32px));
  padding: clamp(34px, 6vw, 76px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(238, 247, 250, 0.94)),
    radial-gradient(circle at 100% 0%, rgba(90, 175, 196, 0.24), transparent 35%);
  border: 1px solid var(--border);
  border-radius: 32px;
  box-shadow: 0 24px 70px var(--shadow);
}
body.dark-mode .hero { background: linear-gradient(135deg, rgba(13, 27, 47, 0.96), rgba(12, 36, 65, 0.92)); }
.hero::before {
  content: "";
  position: absolute;
  inset: auto -12% -45% 38%;
  height: 62%;
  border: 2px solid rgba(90, 175, 196, 0.22);
  border-left: none;
  border-bottom: none;
  border-radius: 50%;
  transform: rotate(-8deg);
}
.hero::after {
  content: "";
  position: absolute;
  right: 7%;
  bottom: 12%;
  width: 180px;
  height: 90px;
  background: linear-gradient(90deg, transparent, rgba(47, 127, 153, 0.28), transparent);
  transform: skewY(-18deg);
  opacity: 0.7;
}
.hero > * { position: relative; z-index: 1; }
.hero.compact { min-height: 360px; }
.hero h1 {
  max-width: 760px;
  color: var(--navy);
  font-family: 'Rajdhani', 'Inter', sans-serif;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 10px 0 18px;
}
body.dark-mode .hero h1 { color: #eaf8ff; }
.hero p { color: var(--muted); line-height: 1.8; font-size: 1.06rem; max-width: 680px; }
.eyebrow {
  color: var(--teal) !important;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-weight: 900;
  font-size: 0.78rem !important;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.btn,
button.submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  padding: 13px 22px;
  cursor: pointer;
  font-weight: 900;
  transition: 0.2s ease;
}
.btn.primary,
button.submit { background: linear-gradient(135deg, var(--navy), var(--teal)); color: #ffffff; box-shadow: 0 12px 26px rgba(47,127,153,0.28); }
.btn.secondary { color: var(--navy); background: var(--surface); border: 1px solid var(--border); }
.btn.small { padding: 10px 16px; color: #fff; background: var(--teal); margin-top: 16px; }
.btn:hover,
button.submit:hover { transform: translateY(-2px); box-shadow: 0 14px 34px var(--shadow-strong); }

.hero-logo-panel {
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 24px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(220, 230, 238, 0.8);
  border-radius: 28px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 20px 48px rgba(7,24,74,0.14);
}
body.dark-mode .hero-logo-panel { background: rgba(255,255,255,0.05); }
.hero-logo-panel img { width: min(100%, 480px); height: auto; object-fit: contain; filter: drop-shadow(0 16px 24px rgba(7,24,74,0.16)); }

main { width: min(1120px, calc(100% - 32px)); margin: 0 auto 70px; }
.trust-strip,
.cards,
.services-grid,
.pricing {
  display: grid;
  gap: 20px;
}
.trust-strip {
  grid-template-columns: repeat(4, 1fr);
  margin: 30px 0;
}
.trust-strip span,
.cards article,
.service-card,
.plan,
.contact,
.mission,
.goals,
.pricing-note,
.web-plan {
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 16px 42px var(--shadow);
}
body.dark-mode .trust-strip span,
body.dark-mode .cards article,
body.dark-mode .service-card,
body.dark-mode .plan,
body.dark-mode .contact,
body.dark-mode .mission,
body.dark-mode .goals,
body.dark-mode .pricing-note,
body.dark-mode .web-plan { background: rgba(13,27,47,0.9); }
.trust-strip span { padding: 18px; text-align: center; color: var(--navy); font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
body.dark-mode .trust-strip span { color: #e9f2f7; }

.mission,
.goals { padding: clamp(26px, 5vw, 48px); margin: 24px 0; text-align: center; }
.mission h2,
.goals h2,
.contact h2,
.pricing-note h2,
.web-plan h2 { color: var(--navy); font-size: clamp(1.8rem, 4vw, 3rem); font-family: 'Rajdhani', 'Inter', sans-serif; line-height: 1; margin-bottom: 14px; }
body.dark-mode .mission h2,
body.dark-mode .goals h2,
body.dark-mode .contact h2,
body.dark-mode .pricing-note h2,
body.dark-mode .web-plan h2 { color: #eaf8ff; }
.mission p,
.goals li,
.cards p,
.service-card p,
.pricing-note p,
.web-plan-copy,
.web-price-card p,
.web-feature-list { color: var(--muted); line-height: 1.75; }
.goals ol { list-style: none; display: grid; gap: 12px; max-width: 820px; margin: 24px auto 0; text-align: left; }
.goals li { padding: 16px 18px; border-left: 4px solid var(--teal); background: var(--surface-soft); border-radius: 14px; }
.goals strong { color: var(--teal); }

.cards { grid-template-columns: repeat(3, 1fr); margin: 24px 0; }
.cards article { padding: 28px; }
.cards h3,
.service-card h3,
.plan h3 { color: var(--teal); font-size: 1.25rem; margin-bottom: 10px; }

.services-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 26px; }
.service-card { padding: 28px; transition: 0.2s ease; }
.service-card:hover { transform: translateY(-6px); box-shadow: 0 22px 52px var(--shadow-strong); }

.pricing-note { padding: clamp(24px, 4vw, 38px); margin: 24px 0 0; text-align: center; }
.pricing-note p { max-width: 780px; margin: 0 auto; }
.pricing-note .eyebrow { margin-bottom: 10px; }

.pricing { grid-template-columns: repeat(3, 1fr); align-items: stretch; margin-top: 28px; }
.plan { position: relative; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.plan.featured { border: 2px solid var(--teal-light); transform: translateY(-8px); }
.plan-label { color: var(--teal); text-transform: uppercase; letter-spacing: 0.18em; font-weight: 900; font-size: 0.72rem; }
.price { color: var(--navy); font-size: 2.4rem; font-weight: 900; }
body.dark-mode .price { color: #eaf8ff; }
.price span { color: var(--muted); font-size: 1rem; }
.plan ul { display: grid; gap: 10px; margin-left: 18px; color: var(--muted); line-height: 1.5; flex: 1; }

.standalone-pricing { margin-top: 28px; }
.web-plan {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 24px;
  padding: clamp(28px, 5vw, 46px);
  border: 2px solid rgba(90, 175, 196, 0.42);
}
.web-plan::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(90,175,196,0.20), transparent 30%),
    linear-gradient(135deg, transparent, rgba(47,127,153,0.08));
  pointer-events: none;
}
.web-plan > * { position: relative; z-index: 1; }
.web-plan-copy { max-width: 850px; }
.web-pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.web-price-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-soft);
}
.web-price-card span { display: block; color: var(--teal); font-weight: 900; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; margin-bottom: 8px; }
.web-price-card strong { display: block; color: var(--navy); font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 900; margin-bottom: 8px; }
body.dark-mode .web-price-card strong { color: #eaf8ff; }
.web-price-card strong span { display: inline; color: var(--muted); font-size: 1rem; letter-spacing: normal; text-transform: none; }
.web-price-card.highlight { background: linear-gradient(135deg, rgba(7, 24, 74, 0.08), rgba(47, 127, 153, 0.13)); border-color: var(--teal-light); }
.web-feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin-left: 18px; }

.contact { max-width: 680px; margin: 28px auto 0; padding: clamp(26px, 5vw, 46px); text-align: center; }
form { margin-top: 20px; text-align: left; }
label { display: block; margin: 16px 0 7px; font-weight: 800; color: var(--navy); }
body.dark-mode label { color: #dcefff; }
input,
textarea,
select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
textarea { resize: vertical; }
input:focus,
textarea:focus,
select:focus { outline: 2px solid rgba(90,175,196,0.35); border-color: var(--teal); }
button.submit { width: 100%; margin-top: 20px; }


#chat-widget { position: fixed; bottom: 30px; right: 30px; z-index: 9999; }
#chat-toggle {
  min-width: 70px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(47,127,153,0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  transition: transform 0.3s;
  font-size: 0.95rem;
  font-weight: 900;
}
#chat-toggle:hover { transform: scale(1.08); }
#chat-box {
  display: none;
  flex-direction: column;
  width: 330px;
  height: 430px;
  background: var(--chat-bg);
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.22);
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}
#chat-box.open { display: flex; }
#chat-header { background: linear-gradient(135deg, var(--navy), var(--teal)); color: #fff; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 0.95em; }
.chat-status { display: flex; align-items: center; gap: 8px; }
.status-dot { width: 9px; height: 9px; background: #45d483; border-radius: 50%; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
#chat-close { background: none; border: none; color: #fff; font-size: 1.2em; cursor: pointer; line-height: 1; padding: 0 4px; }
#chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 0.88em; line-height: 1.5; word-wrap: break-word; }
.chat-msg.bot { background: var(--chat-bubble-bot); color: var(--chat-text); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: var(--chat-bubble-user); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
#chat-quick-replies { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.quick-reply { background: none; border: 1px solid var(--teal); color: var(--teal); border-radius: 20px; padding: 5px 12px; font-size: 0.78em; cursor: pointer; font-weight: 800; }
.quick-reply:hover { background: var(--teal); color: #fff; }
#chat-input-row { display: flex; border-top: 1px solid var(--border); padding: 10px; gap: 8px; }
#chat-input { flex: 1; border-radius: 20px; padding: 8px 14px; font-size: 0.85em; }
#chat-send { background: var(--teal); border: none; border-radius: 999px; min-width: 58px; height: 36px; padding: 0 12px; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-weight: 900; }
#chat-send:hover { background: var(--teal-light); }
.typing-indicator { display: flex; align-items: center; gap: 4px; padding: 12px 16px; min-width: 52px; }
.typing-indicator span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); animation: typingBounce 1.2s infinite ease-in-out; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-6px); opacity: 1; } }

footer { text-align: center; padding: 28px 16px; color: #e9f2f7; background: linear-gradient(135deg, var(--navy), #0b255f); }
.fade-in { animation: fadeIn 0.75s ease-in forwards; opacity: 0; }
.slide-up { animation: slideUp 0.75s ease-out forwards; opacity: 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
  header { flex-wrap: wrap; }
  .hamburger { display: flex; }
  nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding: 10px 0; }
  nav.open { display: flex; }
  nav a { text-align: center; }
  .hero { grid-template-columns: 1fr; text-align: center; padding: 32px 20px; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-logo-panel { min-height: 220px; }
  .trust-strip, .cards, .pricing, .web-pricing-grid, .web-feature-list { grid-template-columns: 1fr; }
  .plan.featured { transform: none; }
  #chat-box { width: 290px; height: 390px; }
  #chat-widget { bottom: 20px; right: 16px; }
}

@media (max-width: 520px) {
  .brand-copy strong { font-size: 1.2rem; }
  .brand-copy small { letter-spacing: 0.35em; }
  .brand img { width: 50px; }
  .header-right { width: 100%; justify-content: flex-end; }
  .hero h1 { font-size: 2.25rem; }
}
