/* ==========================================================================
   Hewcor Technologies Inc. - site styles
   Plain CSS, no build step. Mobile-first, then min-width breakpoints.
   ========================================================================== */

:root {
  --color-primary: #7fae2e;      /* logo green */
  --color-primary-dark: #6a9424;
  --color-dark: #2b2b38;         /* navy/charcoal sections (footer, "Our Business") */
  --color-dark-2: #353544;
  --color-gray-50: #f6f6f6;
  --color-gray-100: #eeeeee;
  --color-gray-300: #cfcfd6;
  --color-gray-600: #6b6b76;
  --color-text: #2c2c34;
  --color-white: #ffffff;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --max-width: 1120px;
  --radius: 6px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* height:auto is required here: without it, an <img width height> pair
   keeps the literal HTML height in px while width scales to its container,
   distorting the image at any width other than its native one. */
img { max-width: 100%; height: auto; display: block; }

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

ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  line-height: 1.25;
  font-weight: 700;
}

p { margin: 0 0 1em; }

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

.eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.6em;
}

.section {
  padding: 64px 0;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  text-align: center;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.section-intro {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
  color: var(--color-gray-600);
}

.bg-light { background: var(--color-gray-50); }
.bg-dark {
  background: var(--color-dark);
  color: var(--color-white);
}
.bg-dark .section-title { color: var(--color-white); }
.bg-dark p { color: #d6d6de; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}
.btn-primary:hover { background: var(--color-primary-dark); }

.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}
.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-dark);
}

/* ---------- Icon badges (shared across features, services, values) ---------- */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(127, 174, 46, 0.12);
  color: var(--color-primary);
  margin-bottom: 16px;
}

.icon-badge svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-badge--dark {
  background: rgba(255, 255, 255, 0.14);
  color: var(--color-white);
}

/* ---------- Top call bar ----------
   Always visible (not tucked behind the mobile hamburger), since most
   visitors are on mobile and one-tap calling is the priority. */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 8px 16px;
  background: var(--color-dark);
  color: var(--color-white);
  font-size: 0.82rem;
  text-align: center;
}

.top-bar a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: color 0.15s ease;
}

.top-bar a:hover { color: var(--color-primary); }

.top-bar svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.top-bar__email { color: #c7c7d1; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--color-gray-100);
  background: var(--color-white);
}

.site-header__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  display: inline-flex;
  align-items: center;
}

.logo img {
  height: 56px;
  width: auto;
}

.nav-toggle {
  position: absolute;
  top: 20px;
  right: 24px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius);
  background: var(--color-white);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 0 8px;
  background: var(--color-dark);
}

.site-nav {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  border-top: 1px solid var(--color-gray-100);
  margin-top: 16px;
  padding-top: 16px;
}

.site-nav.is-open { display: flex; }

.site-nav__links {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.site-nav__links a {
  padding: 12px 0;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav__links a:hover { color: var(--color-primary); }

.site-nav__links a.is-active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.site-nav__phone {
  text-align: center;
  padding: 6px 0 14px;
  font-weight: 700;
  color: var(--color-gray-600);
}

.site-nav__phone a { color: inherit; transition: color 0.15s ease; }
.site-nav__phone a:hover { color: var(--color-primary); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--color-white);
  background: var(--color-dark);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(43, 43, 56, 0.55), rgba(43, 43, 56, 0.8));
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding: 96px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.4em;
}

.hero p {
  max-width: 560px;
  margin: 0 auto 2em;
  font-size: 1.1rem;
  color: #e9e9ee;
}

.hero__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-hero {
  background: var(--color-dark);
  color: var(--color-white);
  text-align: center;
  padding: 64px 24px;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.page-hero p { color: #d6d6de; max-width: 560px; margin: 0 auto; }

/* ---------- Highlight row (home: "Our Business" supporting tiles) ---------- */
.highlight-row {
  display: grid;
  gap: 28px;
  margin: 40px 0 8px;
  text-align: center;
}

.highlight-item h3 {
  font-size: 1.05rem;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.highlight-item p {
  font-size: 0.92rem;
  color: #c7c7d1;
  margin: 0;
}

/* ---------- Feature block (home: Telecommunications / Electrical) ---------- */
.feature {
  display: grid;
  gap: 32px;
  align-items: center;
}

.feature__media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.feature__body h2 {
  font-size: 1.5rem;
  text-transform: uppercase;
}

/* ---------- Clients ---------- */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--color-gray-50);
  border-radius: var(--radius);
  min-height: 110px;
}

.client-logo img { max-height: 48px; }

/* ---------- Service list ---------- */
.service-block {
  display: grid;
  gap: 28px;
  align-items: center;
  padding: 36px 24px;
  border-radius: var(--radius);
}

.service-block:nth-child(even) { background: var(--color-gray-50); }

.service-block__media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.service-block__body h3 {
  font-size: 1.35rem;
  text-transform: uppercase;
}

/* Intro icon row (services page hero: Cell / VSAT / Wireless / SCADA) */
.intro-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  margin: 36px 0 4px;
}

.intro-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 90px;
}

.intro-icon .icon-badge { margin-bottom: 8px; }

.intro-icon span:last-child {
  font-size: 0.85rem;
  font-weight: 700;
  color: #d6d6de;
}

/* Plain pill list (about page: industries served) */
.service-intro-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 24px 0 8px;
}

.service-intro-list li {
  background: var(--color-white);
  color: var(--color-text);
  border: 1px solid var(--color-gray-300);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------- About ---------- */
.about-banner {
  padding: 32px 24px 0;
}

.about-banner img {
  display: block;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  /* Locked to the source photo's own proportions so it's never cropped or
     distorted; same ratio at every viewport width. */
  aspect-ratio: 1021 / 418;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-story {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.values-grid {
  display: grid;
  gap: 20px;
  margin-top: 8px;
}

.value-card {
  background: var(--color-gray-50);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}

.value-card h3 { font-size: 1.1rem; margin-bottom: 0.4em; }
.value-card p { margin: 0; color: var(--color-gray-600); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: 40px;
}

.contact-info h2 { text-transform: uppercase; font-size: 1.3rem; }

.contact-info__item {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.contact-info__icon {
  flex: none;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.contact-info__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-info__item a { font-weight: 600; }
.contact-info__item a:hover { color: var(--color-primary); }

.map-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--color-gray-100);
}

.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

form.contact-form {
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  gap: 18px;
}

.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--color-gray-600);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  background: var(--color-white);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-status {
  display: none;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: #eaf4de;
  color: var(--color-primary-dark);
  font-weight: 600;
}

.form-status.is-visible { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-dark);
  color: #c7c7d1;
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  gap: 28px;
  margin-bottom: 32px;
}

.footer-grid h3 {
  color: var(--color-white);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-grid a:hover { color: var(--color-white); }

.footer-grid ul li { margin-bottom: 8px; }

.site-footer__bottom {
  border-top: 1px solid #45455a;
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: #9a9aa8;
}

.site-footer__parent {
  margin-top: 14px;
}

.parent-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(127, 174, 46, 0.5);
  background: rgba(127, 174, 46, 0.12);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.85rem;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.parent-badge svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.parent-badge:hover {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

/* ---------- Mobile call button (floating, phone-first visitors) ---------- */
.call-fab {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  transition: background-color 0.15s ease;
}

.call-fab:hover { background: var(--color-primary-dark); }

.call-fab svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Chat widget ---------- */
.chat-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  font-family: var(--font-sans);
}

.chat-widget__button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border: none;
  border-radius: 999px;
  background: var(--color-dark);
  color: var(--color-white);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  transition: background-color 0.15s ease;
}

.chat-widget__button:hover { background: var(--color-dark-2); }

.chat-widget__button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-widget__panel {
  display: none;
  flex-direction: column;
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(340px, calc(100vw - 40px));
  max-height: min(520px, calc(100vh - 120px));
  background: var(--color-white);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.chat-widget.is-open .chat-widget__panel { display: flex; }

.chat-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--color-dark);
  color: var(--color-white);
}

.chat-widget__header strong { font-size: 0.95rem; }
.chat-widget__header span { display: block; font-size: 0.78rem; color: #b9b9c4; }

.chat-widget__close {
  border: none;
  background: transparent;
  color: var(--color-white);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.chat-widget__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  background: var(--color-gray-50);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 92%;
}

.chat-bubble--bot { align-self: flex-start; }

.chat-bubble--user {
  align-self: flex-end;
  background: var(--color-primary);
  color: var(--color-white);
}

.chat-widget__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-option {
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--color-gray-300);
  border-radius: 8px;
  background: var(--color-white);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.chat-option:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.chat-widget__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.chat-widget__form input,
.chat-widget__form textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--color-gray-300);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.88rem;
}

.chat-widget__form input:focus,
.chat-widget__form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.chat-widget__form button {
  align-self: flex-start;
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .clients-grid { grid-template-columns: repeat(4, 1fr); }
  .form-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 860px) {
  .nav-toggle { display: none; }

  .logo img { height: 76px; }

  /* Phone/email are always visible in the top bar at this width, and the
     click-to-call FAB is a mobile-only affordance. */
  .call-fab { display: none; }

  .site-nav {
    display: flex !important;
    width: 100%;
  }

  .site-nav__links {
    flex-direction: row;
    justify-content: center;
    gap: 32px;
  }

  .site-nav__links a { padding: 4px 0; }

  .site-nav__phone { padding: 8px 0 0; }

  .feature { grid-template-columns: 1fr 1fr; }
  .feature--reverse .feature__media { order: 2; }

  .service-block { grid-template-columns: 1fr 1fr; }
  .service-block:nth-child(even) .service-block__media { order: 2; }

  .highlight-row { grid-template-columns: repeat(3, 1fr); }

  .values-grid { grid-template-columns: repeat(3, 1fr); }

  .contact-grid { grid-template-columns: 0.9fr 1.1fr; }

  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
