/* =========================================================
   SIOM AI Solutions: Shared Design System
   ========================================================= */

:root {
  --cream: #FFFDF1;
  --peach: #FFCE99;
  --orange: #FF9644;
  --orange-deep: #E8822E;   /* AA-safe for white text on solid fills */
  --brown: #562F00;
  --brown-soft: #8A6648;
  --white: #FFFFFF;
  --line: rgba(86, 47, 0, 0.12);

  --shadow-sm: 0 6px 18px rgba(86, 47, 0, 0.08);
  --shadow-md: 0 16px 40px rgba(86, 47, 0, 0.12);
  --shadow-lg: 0 24px 60px rgba(86, 47, 0, 0.16);

  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;

  --font-head: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --header-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--brown);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.2;
}
p { margin: 0 0 14px; color: var(--brown-soft); }
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: 72px 0; }
.section-tight { padding: 48px 0; }

/* ---------------- Eyebrow / badge ---------------- */
.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--orange-deep);
  margin-bottom: 14px;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14.5px;
  padding: 14px 26px;
  border-radius: var(--radius-md);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--orange-deep); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brown); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: var(--white); color: var(--brown); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--peach); transform: translateY(-2px); }
.btn-outline-light { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.6); }
.btn-outline-light:hover { background: rgba(255,255,255,0.15); }
.btn-block { width: 100%; }

/* ---------------- Navbar ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 253, 241, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 16px; }
.brand img { height: 38px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: 12px;
  flex: 1;
}
.nav-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--brown);
  padding: 8px 0;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--orange-deep);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--orange-deep); }

.has-dropdown { position: relative; }
.dropdown {
  position: absolute; top: 100%; left: 0;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 10px;
  min-width: 200px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all 0.18s ease;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; }
.dropdown a:hover { background: var(--cream); }
.dropdown a::after { display: none; }

.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; border-radius: 10px;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--brown);
  position: relative; transition: 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* ---------------- Page header banner ---------------- */
.page-banner {
  padding: 56px 0 48px;
  background: var(--peach);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.page-banner .container { max-width: 760px; }
.page-banner h1 { font-size: clamp(30px, 4.6vw, 42px); }
.page-banner p { font-size: 16px; color: var(--brown-soft); margin: 0; }

/* ---------------- Hero (home) ---------------- */
.hero {
  padding: 72px 0 56px;
  background: var(--peach);
  border-bottom: 1px solid var(--line);
}
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); }
.hero p.lead { font-size: 17.5px; color: var(--brown-soft); max-width: 520px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* ---------------- Grids & Cards ---------------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .icon {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  background: var(--peach);
  color: var(--brown);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.card .icon svg { width: 20px; height: 20px; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { font-size: 14px; margin-bottom: 0; }

/* ---------------- Placeholder blocks ---------------- */
.placeholder-block {
  background: var(--peach);
  border: 1.5px dashed var(--orange-deep);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  color: var(--brown);
  font-size: 13px;
  font-weight: 600;
  min-height: 220px;
  text-align: center;
  padding: 20px;
}
.placeholder-block .ph-icon { font-size: 30px; }

/* ---------------- Feature photos (real imagery) ---------------- */
.feature-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
}
.feature-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------------- CTA banner ---------------- */
.cta-banner {
  background: var(--brown);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta-banner h2 { color: var(--white); }
.cta-banner p { color: rgba(255,255,255,0.88); max-width: 560px; margin: 0 auto 22px; }
.cta-banner .hero-ctas { justify-content: center; }

/* ---------------- Forms ---------------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.field .req { color: var(--orange-deep); }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--brown);
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--orange-deep); background: var(--white); }
.field textarea { resize: vertical; min-height: 110px; }
.field.checkbox { display: flex; align-items: center; gap: 10px; }
.field.checkbox input { width: auto; }
.field .error-msg { color: #b3401a; font-size: 12.5px; margin-top: 6px; display: none; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #b3401a; }
.field.has-error .error-msg { display: block; }
.form-success {
  display: none;
  text-align: center;
  padding: 30px 10px;
}
.form-success.show { display: block; }
.form-success .check {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--peach); color: var(--brown);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin: 0 auto 14px;
}
.form-error {
  display: none;
  background: #fdeee7;
  border: 1px solid #e8a688;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 16px;
}
.form-error.show { display: block; }
.form-error p { color: #8a3416; font-size: 13.5px; margin: 0; }
.form-error a { color: #8a3416; font-weight: 700; text-decoration: underline; }

/* ---------------- FAQ accordion ---------------- */
.accordion-item { border-bottom: 1px solid var(--line); }
.accordion-trigger {
  width: 100%;
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 4px;
  font-family: var(--font-head);
  font-weight: 600; font-size: 15.5px;
  color: var(--brown);
  text-align: left;
}
.accordion-trigger .plus { font-size: 20px; transition: transform 0.2s ease; color: var(--orange-deep); }
.accordion-item.open .plus { transform: rotate(45deg); }
.accordion-panel {
  max-height: 0; overflow: hidden;
  transition: max-height 0.25s ease;
}
.accordion-panel p { padding: 0 4px 18px; font-size: 14px; }

/* ---------------- Lightbox (org chart) ---------------- */
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(40, 20, 0, 0.75);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 32px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: 100%; max-height: 88vh; border-radius: 12px; box-shadow: var(--shadow-lg); }
.lightbox-close {
  position: absolute; top: 24px; right: 28px;
  background: var(--white); border: none; border-radius: 50%;
  width: 40px; height: 40px; font-size: 18px; cursor: pointer;
}

/* ---------------- Footer ---------------- */
.site-footer { background: var(--brown); color: rgba(255,253,241,0.85); padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; margin-bottom: 36px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { height: 34px; filter: brightness(0) invert(1); }
.footer-brand span { font-family: var(--font-head); font-weight: 700; color: var(--white); }
.site-footer p { color: rgba(255,253,241,0.65); font-size: 13.5px; }
.footer-col h4 { color: var(--white); font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { font-size: 14px; color: rgba(255,253,241,0.8); }
.footer-col a:hover { color: var(--orange); }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,253,241,0.12);
  display: flex; align-items: center; justify-content: center;
}
.footer-social a:hover { background: var(--orange); }
.footer-bottom {
  border-top: 1px solid rgba(255,253,241,0.14);
  padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 12.5px; color: rgba(255,253,241,0.55);
}

/* ---------------- Alternating sections ---------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.reverse .split-media { order: 2; }

/* ---------------- Utility ---------------- */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-0 { margin-top: 0; }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { font-size: 12.5px; font-weight: 600; background: var(--cream); border: 1px solid var(--line); padding: 6px 14px; border-radius: var(--radius-sm); }

/* ---------------- Chat widget (SIOM AI Assistant) ---------------- */
.chat-shell {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  height: 640px;
  position: sticky;
  top: 20px;
  overflow: hidden;
}
.chat-head {
  background: var(--brown);
  color: white;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-head .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.chat-head .title { font-weight: 700; font-size: 15.5px; line-height: 1.2; font-family: var(--font-head); }
.chat-head .status { font-size: 12px; opacity: 0.85; display: flex; align-items: center; gap: 6px; }
.chat-head .dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; display: inline-block; }
.chat-head .reset-btn { margin-left: auto; background: rgba(255,255,255,0.16); border: none; color: white; font-size: 12px; padding: 7px 12px; border-radius: 999px; cursor: pointer; }
.chat-head .reset-btn:hover { background: rgba(255,255,255,0.3); }

.messages { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; background: var(--cream); }
.messages::-webkit-scrollbar { width: 6px; }
.messages::-webkit-scrollbar-thumb { background: var(--peach); border-radius: 10px; }

.row { display: flex; gap: 8px; max-width: 88%; animation: msgIn 0.25s ease both; }
.row.user { align-self: flex-end; flex-direction: row-reverse; }
.row.bot { align-self: flex-start; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.avatar-sm { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; background: var(--peach); color: var(--brown); }
.row.user .avatar-sm { background: var(--orange-deep); color: white; }

.bubble { padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.row.bot .bubble { background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 4px; color: var(--brown); }
.row.user .bubble { background: var(--orange-deep); color: white; border-bottom-right-radius: 4px; }
.timestamp { font-size: 10px; color: var(--brown-soft); margin-top: 3px; }
.row.user .timestamp { text-align: right; }

.typing-row { align-self: flex-start; display: flex; gap: 8px; }
.typing-bubble { background: var(--white); border: 1px solid var(--line); padding: 12px 16px; border-radius: 16px; border-bottom-left-radius: 4px; display: flex; gap: 4px; }
.typing-bubble span { width: 6px; height: 6px; border-radius: 50%; background: var(--brown-soft); animation: chatBlink 1.2s infinite ease-in-out; }
.typing-bubble span:nth-child(2) { animation-delay: 0.2s; }
.typing-bubble span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatBlink { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }

.quick-replies { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 2px 34px; max-width: 88%; }
.chip { border: 1px solid var(--orange-deep); color: var(--brown); background: white; padding: 7px 13px; border-radius: 999px; font-size: 12.5px; cursor: pointer; transition: all 0.15s ease; }
.chip:hover { background: var(--orange-deep); color: white; }

.composer { display: flex; align-items: center; gap: 10px; padding: 14px; background: var(--white); border-top: 1px solid var(--peach); }
.composer input { flex: 1; border: 1px solid var(--peach); background: var(--cream); border-radius: 999px; padding: 11px 16px; font-size: 14px; outline: none; color: var(--brown); font-family: var(--font-body); }
.composer input:focus { border-color: var(--orange-deep); background: white; }
.composer button { width: 42px; height: 42px; border-radius: 50%; border: none; background: var(--orange-deep); color: white; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.composer button:hover { background: var(--brown); }
.composer button:disabled { background: var(--peach); color: var(--brown-soft); cursor: not-allowed; }

@media (max-width: 960px) {
  .chat-shell { height: 70vh; position: relative; top: 0; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
  .hero .container, .split { grid-template-columns: 1fr; }
  .split .split-media { order: -1; }
  .split.reverse .split-media { order: -1; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-links { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: var(--cream); flex-direction: column; align-items: flex-start; padding: 24px; gap: 4px; transform: translateX(-100%); transition: transform 0.25s ease; overflow-y: auto; }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { width: 100%; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .has-dropdown .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; display: none; padding-left: 14px; }
  .has-dropdown.open .dropdown { display: block; }
  .nav-toggle { display: flex; }
  .nav-cta .btn-primary { display: none; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-banner { padding: 32px 22px; }
}
