/* ── Ironclad Home Services — UI ────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@300;400;500&display=swap');

:root {
  --orange:    #E87722;
  --orange-dk: #c4621a;
  --dark:      #0f1923;
  --dark-2:    #162030;
  --mid:       #4a5568;
  --light:     #f7f8fa;
  --white:     #ffffff;
  --blue:      #4A9EE8;
  --yellow:    #F5C842;
  --red:       #E84A4A;
  --radius:    10px;
  --shadow:    0 4px 24px rgba(0,0,0,.12);
  --font-head: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--dark);
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 64px;
  background: rgba(15,25,35,.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(232,119,34,.15);
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-brand {
  font-family: var(--font-head); font-weight: 800; font-size: 1.1rem;
  color: var(--white); letter-spacing: -.02em;
}
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a {
  font-family: var(--font-body); font-size: .82rem; color: rgba(255,255,255,.7);
  text-decoration: none; transition: color .2s;
}
.nav-links a:hover { color: var(--white); }
.nav-cta {
  background: var(--orange) !important; color: var(--white) !important;
  padding: 8px 18px; border-radius: 6px; font-weight: 600 !important;
  font-size: .8rem !important; transition: background .2s !important;
}
.nav-cta:hover { background: var(--orange-dk) !important; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh; background: var(--dark);
  display: flex; align-items: center; justify-content: space-between;
  padding: 100px 40px 60px; gap: 60px;
}
.hero-badge {
  display: inline-block;
  font-family: var(--font-body); font-size: .72rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--orange); border: 1px solid rgba(232,119,34,.35);
  padding: 5px 14px; border-radius: 20px; margin-bottom: 24px;
}
.hero-title {
  font-family: var(--font-head); font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800; color: var(--white); line-height: 1.1;
  letter-spacing: -.03em; margin-bottom: 20px;
}
.hero-accent { color: var(--orange); }
.hero-sub {
  font-size: .95rem; color: rgba(255,255,255,.6); line-height: 1.7;
  max-width: 460px; margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 14px; align-items: center; margin-bottom: 48px; flex-wrap: wrap; }
.btn-primary {
  font-family: var(--font-head); font-size: .85rem; font-weight: 700;
  background: var(--orange); color: var(--white);
  padding: 14px 28px; border-radius: 8px; text-decoration: none;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--orange-dk); transform: translateY(-1px); }
.btn-ghost {
  font-family: var(--font-body); font-size: .82rem; font-weight: 500;
  color: rgba(255,255,255,.75); border: 1.5px solid rgba(255,255,255,.2);
  padding: 13px 24px; border-radius: 8px; text-decoration: none;
  transition: border-color .2s, color .2s;
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }

.hero-proof { display: flex; align-items: center; gap: 24px; }
.proof-item { display: flex; flex-direction: column; gap: 2px; }
.proof-num {
  font-family: var(--font-head); font-size: 1.1rem; font-weight: 700;
  color: var(--white);
}
.proof-label { font-size: .7rem; color: rgba(255,255,255,.45); letter-spacing: .05em; }
.proof-divider { width: 1px; height: 32px; background: rgba(255,255,255,.12); }

.hero-visual { flex-shrink: 0; }
.hero-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(232,119,34,.2);
  border-radius: 14px; padding: 24px 28px; display: flex;
  align-items: center; gap: 16px; width: 340px;
  backdrop-filter: blur(8px);
}
.hero-card-icon { font-size: 1.8rem; }
.hero-card-text { flex: 1; }
.hero-card-title {
  font-family: var(--font-head); font-size: .9rem; font-weight: 600;
  color: var(--white); margin-bottom: 4px;
}
.hero-card-sub { font-size: .75rem; color: rgba(255,255,255,.5); }
.hero-card-badge {
  font-family: var(--font-head); font-size: .68rem; font-weight: 700;
  background: rgba(34,197,94,.15); color: #4ade80;
  padding: 4px 10px; border-radius: 20px; white-space: nowrap;
}

/* ── Services ────────────────────────────────────────────────────────────── */
.services-section { padding: 80px 40px; background: var(--light); }
.section-header { text-align: center; margin-bottom: 52px; }
.section-eyebrow {
  font-family: var(--font-body); font-size: .72rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 10px;
}
.section-title {
  font-family: var(--font-head); font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800; letter-spacing: -.03em; color: var(--dark);
  margin-bottom: 12px;
}
.section-sub { font-size: .9rem; color: var(--mid); max-width: 480px; margin: 0 auto; }

.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px; max-width: 1100px; margin: 0 auto;
}
.service-card {
  background: var(--white); border: 1.5px solid rgba(0,0,0,.07);
  border-radius: 14px; padding: 32px 28px;
  transition: border-color .2s, box-shadow .2s;
}
.service-card:hover { border-color: var(--orange); box-shadow: var(--shadow); }
.service-card-primary { border-color: rgba(232,119,34,.3); background: #fff9f5; }
.service-card-emergency { border-color: rgba(232,74,74,.2); background: #fff8f8; }
.service-icon { margin-bottom: 18px; }
.service-name {
  font-family: var(--font-head); font-size: 1.1rem; font-weight: 700;
  color: var(--dark); margin-bottom: 8px;
}
.service-desc { font-size: .83rem; color: var(--mid); line-height: 1.6; margin-bottom: 14px; }
.service-price {
  font-family: var(--font-body); font-size: .75rem; font-weight: 500;
  color: var(--orange); letter-spacing: .02em;
}

/* ── Why Ironclad ────────────────────────────────────────────────────────── */
.why-section { padding: 80px 40px; background: var(--dark-2); }
.why-content { max-width: 760px; margin: 0 auto; }
.why-title {
  font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800; color: var(--white); margin-bottom: 40px; letter-spacing: -.03em;
}
.why-section .section-eyebrow { text-align: left; }
.why-grid { display: grid; gap: 24px; }
.why-item { display: flex; gap: 18px; align-items: flex-start; }
.why-icon {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(232,119,34,.15); border: 1.5px solid rgba(232,119,34,.3);
  color: var(--orange); display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700; flex-shrink: 0;
}
.why-label {
  font-family: var(--font-head); font-size: .95rem; font-weight: 700;
  color: var(--white); margin-bottom: 4px;
}
.why-text { font-size: .82rem; color: rgba(255,255,255,.55); line-height: 1.6; }

/* ── Contact ─────────────────────────────────────────────────────────────── */
.contact-section { background: var(--dark); padding: 72px 40px; text-align: center; }
.contact-inner { max-width: 560px; margin: 0 auto; }
.contact-section h2 {
  font-family: var(--font-head); font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800; color: var(--white); margin-bottom: 12px; letter-spacing: -.03em;
}
.contact-sub { font-size: .9rem; color: rgba(255,255,255,.55); margin-bottom: 32px; }
.contact-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.btn-ghost-light {
  font-family: var(--font-body); font-size: .82rem; font-weight: 500;
  color: rgba(255,255,255,.7); border: 1.5px solid rgba(255,255,255,.2);
  padding: 13px 24px; border-radius: 8px; text-decoration: none;
  transition: border-color .2s, color .2s;
}
.btn-ghost-light:hover { border-color: var(--orange); color: var(--orange); }
.contact-info { font-size: .78rem; color: rgba(255,255,255,.35); margin-bottom: 6px; }
.contact-hours { font-size: .78rem; color: rgba(255,255,255,.35); }

/* ── Chat Button ─────────────────────────────────────────────────────────── */
#chat-btn {
  position: fixed; bottom: 28px; right: 28px; z-index: 200;
  width: 58px; height: 58px; border-radius: 50%; border: none;
  background: var(--orange); color: white; font-size: 1.4rem;
  cursor: pointer; box-shadow: 0 4px 20px rgba(232,119,34,.4);
  transition: transform .2s, box-shadow .2s;
}
#chat-btn:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(232,119,34,.55); }
.notif-dot {
  position: absolute; top: 8px; right: 8px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #22c55e; border: 2px solid var(--orange);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: .7; }
}

/* ── Chat Window ─────────────────────────────────────────────────────────── */
#chat-window {
  position: fixed; bottom: 100px; right: 28px; z-index: 200;
  width: 380px; max-height: 580px;
  background: var(--white); border-radius: 16px;
  box-shadow: 0 8px 48px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  overflow: hidden; display: none;
}
#chat-window.open { display: flex; }
.chat-header {
  background: var(--dark); padding: 16px 18px;
  display: flex; align-items: center; gap: 12px;
}
.chat-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(232,119,34,.2); border: 1.5px solid rgba(232,119,34,.3);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.chat-header-info { flex: 1; }
.chat-header-info h3 {
  font-family: var(--font-head); font-size: .9rem; font-weight: 700;
  color: var(--white); margin-bottom: 2px;
}
.chat-header-status { display: flex; align-items: center; gap: 6px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.chat-header-status p { font-size: .7rem; color: rgba(255,255,255,.5); }
#chat-close {
  background: none; border: none; color: rgba(255,255,255,.5);
  font-size: 1rem; cursor: pointer; transition: color .2s;
}
#chat-close:hover { color: var(--white); }

#chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; font-size: .83rem; line-height: 1.55; }
.msg.user { background: var(--orange); color: white; align-self: flex-end; border-radius: 12px 12px 2px 12px; }
.msg.bot { background: #f1f3f5; color: var(--dark); align-self: flex-start; border-radius: 12px 12px 12px 2px; }
.msg.typing { background: #f1f3f5; align-self: flex-start; }
.typing-dots { display: flex; gap: 4px; padding: 4px 0; }
.typing-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: #999; animation: typing-bounce .9s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes typing-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

#chat-input-row {
  padding: 12px 14px; border-top: 1px solid #eee;
  display: flex; gap: 8px; align-items: flex-end;
}
#chat-input {
  flex: 1; border: 1.5px solid #ddd; border-radius: 8px; padding: 9px 12px;
  font-family: var(--font-body); font-size: .82rem; resize: none; outline: none;
  transition: border-color .2s; max-height: 100px;
}
#chat-input:focus { border-color: var(--orange); }
#chat-send {
  background: var(--orange); color: white; border: none; border-radius: 8px;
  width: 36px; height: 36px; cursor: pointer; font-size: .9rem;
  transition: background .2s; flex-shrink: 0;
}
#chat-send:hover { background: var(--orange-dk); }

/* ── Mic button ──────────────────────────────────────────────────────────── */
#mic-btn {
  background: rgba(232,119,34,.1); border: 1.5px solid rgba(232,119,34,.3);
  border-radius: 8px; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; cursor: pointer; transition: background .2s, border-color .2s;
  flex-shrink: 0;
}
#mic-btn:hover { background: rgba(232,119,34,.2); border-color: var(--orange); }
#mic-btn.listening {
  background: rgba(232,74,74,.15); border-color: #E84A4A;
  animation: mic-pulse 1.2s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,74,74,.4); }
  50%       { box-shadow: 0 0 0 8px rgba(232,74,74,.0); }
}

/* ── Mute button ─────────────────────────────────────────────────────────── */
#mute-btn {
  background: none; border: none; font-size: .95rem;
  cursor: pointer; opacity: .6; transition: opacity .2s; padding: 4px;
}
#mute-btn:hover { opacity: 1; }

/* ── Avatar speaking animation ───────────────────────────────────────────── */
.chat-avatar.speaking {
  animation: avatar-speak .6s ease-in-out infinite alternate;
  box-shadow: 0 0 0 3px rgba(232,119,34,.5);
}
@keyframes avatar-speak {
  from { box-shadow: 0 0 0 2px rgba(232,119,34,.3); }
  to   { box-shadow: 0 0 0 6px rgba(232,119,34,.0); }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { flex-direction: column; padding-top: 90px; text-align: center; }
  .hero-sub { margin: 0 auto 36px; }
  .hero-actions { justify-content: center; }
  .hero-proof { justify-content: center; }
  .hero-visual { display: none; }
  .nav-links li:not(:last-child) { display: none; }
}
@media (max-width: 600px) {
  .nav { padding: 0 20px; }
  .hero { padding: 90px 20px 48px; }
  .services-section, .why-section, .contact-section { padding: 56px 20px; }
  #chat-window { width: calc(100vw - 32px); right: 16px; }
}
