/* ============================================================
   RGC Wireless — Public Site
   File:      style.css
   Purpose:   Shared stylesheet for every public page (design
              tokens, layout, components) — English and Spanish.
   Version:   1.3.0
   Updated:   2026-08-19 (added chat widget styles)
   ------------------------------------------------------------
   Palette: sand / rust / brush / dusk / gold / ink
   Display: Fraunces  |  Body: Public Sans  |  Utility: IBM Plex Mono

   Section index (search for these markers to jump around):
     :root              design tokens (colors, type, radius)
     Header / Nav        sticky top bar, mobile menu
     Buttons              .btn variants
     Hero                 homepage hero + stat strip
     Section              generic section padding / on-brush / on-dusk
     Coverage chips        town-chip list (Home)
     Cards                 quick-link cards (Home, About)
     Plan cards             pricing plans (Products)
     Process / diagram      signal chain steps (Technology)
     Contact                 info blocks + map card (Contact)
     CTA banner               call-to-action strip
     Footer                    site-wide footer
     Page header                interior page hero (About/Tech/Products/Contact)
     Responsive                   breakpoints
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Public+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root{
  --sand:   #EFE2C4;
  --sand-2: #F8F1DE;
  --cream:  #FBF6E9;
  --rust:   #A8451B;
  --rust-2: #8B3814;
  --brush:  #3E5340;
  --brush-2:#2C3D2E;
  --dusk:   #223244;
  --gold:   #D6A23C;
  --ink:    #2A2013;
  --ink-soft: #4A4030;
  --line:   rgba(42,32,19,0.14);

  --display: 'Fraunces', serif;
  --body: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --radius: 14px;
  --container: 1120px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: var(--body);
  background: var(--sand);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; }
a{ color: var(--rust); text-decoration: none; }
a:hover{ text-decoration: underline; }
:focus-visible{ outline: 3px solid var(--gold); outline-offset: 2px; }

h1,h2,h3,h4{
  font-family: var(--display);
  color: var(--ink);
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.12;
}
h1{ font-size: clamp(2.2rem, 4.5vw, 3.6rem); font-weight: 700; }
h2{ font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3{ font-size: 1.25rem; }
p{ margin: 0 0 1em; color: var(--ink-soft); max-width: 62ch; }

.eyebrow{
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--rust);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.9em;
}
.eyebrow::before{
  content:"";
  width: 18px; height: 1px;
  background: var(--rust);
  display: inline-block;
}

.wrap{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Signature: signal-ring device ---------- */
.rings{ display:block; }
.rings circle{ fill:none; stroke: currentColor; }

.divider{
  display:flex; align-items:center; gap: 14px;
  color: var(--rust);
  margin: 0 0 34px;
}
.divider .line{ flex:1; height:1px; background: var(--line); }
.divider svg{ width: 26px; height: 26px; opacity: 0.85; }

/* ---------- Header / Nav ---------- */
.site-header{
  position: sticky; top:0; z-index: 50;
  background: rgba(239,226,196,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding: 16px 28px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand{
  display:flex; align-items:center; gap:12px;
  font-family: var(--display);
  font-weight: 700; font-size: 1.7rem;
  color: var(--ink);
}
.brand:hover{ text-decoration:none; }
.brand svg{ width: 38px; height: 38px; color: var(--rust); flex-shrink:0; }
.brand .sub{
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em;
  color: var(--ink-soft); text-transform: uppercase; display:block; margin-top:2px;
}

.nav-links{
  display:flex; align-items:center; gap: 26px;
  list-style:none; margin:0; padding:0;
}
.nav-links a{
  color: var(--ink); font-weight: 600; font-size: 0.94rem;
  position: relative; padding: 4px 0;
}
.nav-links a:hover{ text-decoration:none; color: var(--rust); }
.nav-links a.active{ color: var(--rust); }
.nav-links a.active::after{
  content:"";
  position:absolute; left:0; right:0; bottom:-6px;
  height: 3px; border-radius: 2px;
  background: var(--gold);
}
.nav-links .divider-dot{
  width:4px; height:4px; border-radius:50%;
  background: var(--line);
}
.nav-utility{ display:flex; align-items:center; gap: 14px; }
.btn-lang{
  font-family: var(--mono); font-size: 0.78rem;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; color: var(--ink-soft);
}
.btn-lang:hover{ border-color: var(--rust); color: var(--rust); text-decoration:none; }

.nav-toggle{
  display:none; background:none; border:none; cursor:pointer;
  width: 40px; height: 40px; padding:8px;
}
.nav-toggle span{
  display:block; width:100%; height:2px; background: var(--ink); margin: 5px 0; border-radius:2px;
}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  font-family: var(--body); font-weight:700; font-size: 0.96rem;
  padding: 13px 24px; border-radius: 999px;
  border: 1px solid transparent; cursor:pointer;
}
.btn:hover{ text-decoration:none; }
.btn-primary{ background: var(--rust); color: var(--cream); }
.btn-primary:hover{ background: var(--rust-2); }
.btn-outline{ border-color: var(--ink); color: var(--ink); }
.btn-outline:hover{ background: var(--ink); color: var(--sand-2); }
.btn-ghost{ color: var(--brush); border-color: var(--line); background: var(--sand-2); }
.btn-ghost:hover{ background: var(--brush); color: var(--sand-2); }

/* ---------- Hero ---------- */
.hero{
  padding: 64px 0 40px;
}
.hero .wrap{
  display:grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items:center;
}
.hero h1{ margin-bottom: 0.4em; }
.hero .lede{ font-size: 1.12rem; max-width: 46ch; }
.hero-cta{ display:flex; gap:14px; flex-wrap:wrap; margin-top: 28px; }
.hero-art{ width:100%; height:auto; }

.stat-strip{
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 54px;
}
.stat-strip .wrap{
  display:flex; flex-wrap:wrap; gap: 10px 40px;
  padding: 22px 28px;
}
.stat{ font-family: var(--mono); }
.stat .num{ color: var(--rust); font-weight:500; font-size:1.05rem; }
.stat .label{ color: var(--ink-soft); font-size: 0.78rem; text-transform:uppercase; letter-spacing:0.06em; }

/* ---------- Section ---------- */
.section{ padding: 84px 0; }
.section.tight{ padding: 56px 0; }
.section-head{ max-width: 60ch; margin-bottom: 44px; }
.section.on-brush{ background: var(--brush); color: var(--sand-2); }
.section.on-brush h2, .section.on-brush h1{ color: var(--sand-2); }
.section.on-brush p{ color: rgba(251,246,233,0.82); }
.section.on-brush .eyebrow{ color: var(--gold); }
.section.on-brush .eyebrow::before{ background: var(--gold); }

.section.on-dusk{ background: var(--dusk); color: var(--sand-2); }
.section.on-dusk h2, .section.on-dusk h1{ color: var(--sand-2); }
.section.on-dusk p{ color: rgba(251,246,233,0.78); }

/* ---------- Coverage chips ---------- */
.town-grid{
  display:flex; flex-wrap:wrap; gap: 12px;
}
.town-chip{
  display:inline-flex; align-items:center; gap:8px;
  font-family: var(--mono); font-size: 0.86rem;
  padding: 10px 16px; border-radius: 999px;
  background: var(--sand-2); border:1px solid var(--line);
  color: var(--ink);
}
.town-chip svg{ width:12px; height:12px; color: var(--rust); }

.zip-note{
  font-family: var(--mono); font-size: 0.82rem; color: var(--ink-soft);
  margin-top: 22px;
}

/* ---------- Cards ---------- */
.card-grid{
  display:grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr));
  gap: 22px;
}
.card{
  background: var(--sand-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.card svg{ width:28px; height:28px; color: var(--rust); margin-bottom: 14px; }
.card h3{ margin-bottom: 0.4em; }
.card p{ font-size: 0.94rem; margin-bottom: 0.6em; }
.card a.card-link{ font-family: var(--mono); font-size: 0.82rem; font-weight:600; }

/* ---------- Plan cards (Products) ---------- */
.plan-grid{
  display:grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 22px;
}
.plan{
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  position: relative;
}
.plan.featured{ border-color: var(--rust); box-shadow: 0 8px 24px rgba(168,69,27,0.12); }
.plan .badge{
  position:absolute; top:-12px; right: 22px;
  background: var(--gold); color: var(--ink);
  font-family: var(--mono); font-size: 0.7rem; font-weight:700;
  padding: 5px 10px; border-radius: 999px; letter-spacing:0.04em;
}
.plan .speed{
  font-family: var(--mono); color: var(--rust); font-size: 0.85rem; margin-bottom: 10px;
}
.plan ul{ list-style:none; margin: 16px 0 0; padding:0; }
.plan li{
  display:flex; gap:10px; align-items:flex-start;
  font-size: 0.92rem; color: var(--ink-soft); padding: 6px 0;
}
.plan li svg{ width:14px; height:14px; margin-top:4px; color: var(--brush); flex-shrink:0; }

.throttle-banner{
  display:flex; align-items:flex-start; gap: 20px;
  background: var(--brush); color: var(--sand-2);
  border-radius: var(--radius); padding: 30px 32px;
  margin-top: 40px;
}
.throttle-banner svg{ width:34px; height:34px; color: var(--gold); flex-shrink:0; }
.throttle-banner h3{ color: var(--sand-2); margin-bottom:6px; }
.throttle-banner p{ color: rgba(251,246,233,0.85); margin:0; }

/* ---------- Process / diagram (Technology) ---------- */
.chain{
  display:grid; grid-template-columns: repeat(4, 1fr);
  gap: 0;
  align-items: start;
}
.chain-step{ text-align:left; position:relative; padding-right: 18px; }
.chain-step .idx{
  font-family: var(--mono); color: var(--gold); font-size: 0.78rem; margin-bottom:10px; display:block;
}
.chain-step svg{ width:34px; height:34px; color: var(--gold); margin-bottom: 14px; }
.chain-step h3{ color: var(--sand-2); font-size:1.05rem; }
.chain-step p{ font-size: 0.88rem; color: rgba(251,246,233,0.75); }
.chain-arrow{ display:none; }

.spec-list{
  display:grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
  gap: 24px; margin-top: 12px;
}
.spec{ border-left: 2px solid var(--rust); padding-left: 16px; }
.spec .k{ font-family: var(--mono); font-size:0.72rem; text-transform:uppercase; letter-spacing:0.08em; color: var(--ink-soft); }
.spec .v{ font-family: var(--display); font-size: 1.25rem; margin-top:4px; }

/* ---------- Contact ---------- */
.contact-grid{
  display:grid; grid-template-columns: 1fr 1fr; gap: 40px;
}
.info-block{ margin-bottom: 30px; }
.info-block .label{
  font-family: var(--mono); font-size: 0.75rem; text-transform:uppercase; letter-spacing:0.07em;
  color: var(--rust); margin-bottom:8px; display:block;
}
.info-block .value{ font-family: var(--display); font-size: 1.35rem; }
.info-block .value a{ color: var(--ink); }
.info-block .value a:hover{ color: var(--rust); }

.map-card{
  background: var(--brush); border-radius: var(--radius);
  padding: 30px; color: var(--sand-2); min-height: 260px;
  display:flex; flex-direction:column; justify-content:space-between;
}
.map-card svg{ width:100%; height:auto; }

.quick-links{ display:flex; flex-wrap:wrap; gap:12px; margin-top: 10px; }

/* ---------- CTA banner ---------- */
.cta-banner{
  background: var(--dusk); color: var(--sand-2);
  border-radius: var(--radius);
  padding: 52px 44px;
  display:flex; align-items:center; justify-content:space-between; gap: 24px; flex-wrap:wrap;
}
.cta-banner h2{ color: var(--sand-2); margin-bottom: 0.25em; }
.cta-banner p{ color: rgba(251,246,233,0.8); margin:0; }

/* ---------- Footer ---------- */
.site-footer{
  background: var(--ink); color: rgba(251,246,233,0.72);
  padding: 56px 0 28px;
}
.footer-grid{
  display:grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px;
  padding-bottom: 36px; border-bottom: 1px solid rgba(251,246,233,0.14);
}
.footer-brand{ display:flex; align-items:center; gap:12px; font-family: var(--display); font-weight:700; font-size:1.5rem; color: var(--sand-2); margin-bottom: 12px; }
.footer-brand svg{ width:30px; height:30px; color: var(--gold); flex-shrink:0; }
.site-footer h4{
  color: var(--sand-2); font-family: var(--mono); font-size: 0.76rem;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px;
}
.site-footer ul{ list-style:none; margin:0; padding:0; }
.site-footer li{ margin-bottom: 9px; }
.site-footer a{ color: rgba(251,246,233,0.72); font-size: 0.92rem; }
.site-footer a:hover{ color: var(--gold); }
.footer-bottom{
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px;
  padding-top: 22px; font-size: 0.8rem; font-family: var(--mono); color: rgba(251,246,233,0.5);
}

/* ---------- Page header (interior pages) ---------- */
.page-header{ padding: 56px 0 20px; }
.page-header .wrap{ max-width: 74ch; }

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .hero .wrap{ grid-template-columns: 1fr; }
  .hero-art{ order:-1; max-width: 340px; margin: 0 auto; }
  .contact-grid{ grid-template-columns: 1fr; }
  .chain{ grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px){
  .nav-links, .nav-utility .btn-lang{ display:none; }
  .nav-toggle{ display:block; }
  .nav.open .nav-links{
    display:flex; position:absolute; top:100%; left:0; right:0;
    background: var(--sand-2); flex-direction:column; align-items:flex-start;
    padding: 20px 28px; gap: 16px; border-bottom: 1px solid var(--line);
  }
  .chain{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr; gap: 26px; }
  .cta-banner{ flex-direction:column; align-items:flex-start; }
}

/* ============================================================
   Chat Widget — floating support bubble (see chat-widget.js)
   Added in style.css v1.3.0
   ============================================================ */
.chat-bubble{
  position: fixed; right: 22px; bottom: 22px; z-index: 200;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--rust); color: var(--cream);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(42,32,19,0.28);
  transition: transform 0.15s ease, background 0.15s ease;
}
.chat-bubble:hover{ background: var(--rust-2); transform: scale(1.05); }
.chat-bubble svg{ width: 26px; height: 26px; }
.chat-bubble .chat-bubble-close-icon{ display:none; }
.chat-bubble.open .chat-bubble-chat-icon{ display:none; }
.chat-bubble.open .chat-bubble-close-icon{ display:block; }
.chat-bubble .chat-unread-dot{
  position:absolute; top:6px; right:6px;
  width:10px; height:10px; border-radius:50%;
  background: var(--gold); border:2px solid var(--sand);
  display:none;
}
.chat-bubble.has-unread .chat-unread-dot{ display:block; }

.chat-panel{
  position: fixed; right: 22px; bottom: 94px; z-index: 200;
  width: 360px; max-width: calc(100vw - 44px);
  height: 500px; max-height: calc(100vh - 140px);
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(42,32,19,0.28);
  display: none; flex-direction: column; overflow: hidden;
}
.chat-panel.open{ display: flex; }

.chat-panel-header{
  background: var(--dusk); color: var(--sand-2);
  padding: 16px 18px; display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.chat-panel-header .title{ font-family: var(--display); font-weight:700; font-size:1.05rem; }
.chat-panel-header .subtitle{ font-family: var(--mono); font-size:0.7rem; color: var(--gold); text-transform:uppercase; letter-spacing:0.06em; }
.chat-panel-close{
  background:none; border:none; color: var(--sand-2); cursor:pointer;
  width:28px; height:28px; display:flex; align-items:center; justify-content:center; opacity:0.8;
}
.chat-panel-close:hover{ opacity:1; }
.chat-panel-close svg{ width:18px; height:18px; }

.chat-messages{
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--sand-2);
}
.chat-msg{
  max-width: 84%; padding: 10px 13px; border-radius: 12px;
  font-size: 0.9rem; line-height: 1.45; word-wrap: break-word;
}
.chat-msg.bot{
  align-self: flex-start; background: var(--cream);
  border: 1px solid var(--line); border-bottom-left-radius: 3px;
}
.chat-msg.user{
  align-self: flex-end; background: var(--rust); color: var(--cream);
  border-bottom-right-radius: 3px;
}
.chat-msg.error{
  align-self: center; background: transparent; color: var(--ink-soft);
  font-family: var(--mono); font-size: 0.78rem; text-align:center; max-width:100%;
}
.chat-typing{
  align-self: flex-start; display:flex; gap:4px; padding: 10px 13px;
}
.chat-typing span{
  width:6px; height:6px; border-radius:50%; background: var(--ink-soft); opacity:0.5;
  animation: chatTypingBounce 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2){ animation-delay: 0.15s; }
.chat-typing span:nth-child(3){ animation-delay: 0.3s; }
@keyframes chatTypingBounce{
  0%, 60%, 100% { transform: translateY(0); opacity:0.5; }
  30% { transform: translateY(-4px); opacity:1; }
}

.chat-input-row{
  display:flex; gap:8px; padding: 12px; border-top: 1px solid var(--line);
  background: var(--cream);
}
.chat-input-row input{
  flex:1; padding: 10px 13px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--sand-2); font-family: var(--body); font-size: 0.9rem; color: var(--ink);
}
.chat-input-row button{
  width: 40px; height: 40px; border-radius: 10px; border:none;
  background: var(--rust); color: var(--cream); cursor:pointer;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.chat-input-row button:hover{ background: var(--rust-2); }
.chat-input-row button:disabled{ opacity:0.5; cursor:default; }
.chat-input-row button svg{ width:18px; height:18px; }

@media (max-width: 480px){
  .chat-panel{ right: 12px; bottom: 84px; }
  .chat-bubble{ right: 16px; bottom: 16px; }
}
