/*
Theme Name: syTechnologies
Theme URI: https://sytechnologies.co.za
Author: syTechnologies (Pty) Ltd
Description: Lightweight brochure theme for syTechnologies (Pty) Ltd — industrial automation and system integration. Built to run comfortably on shared hosting: no external font or script requests, no page builder required.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sytechnologies
Tags: business, one-column, two-columns, custom-menu, custom-logo, featured-images, translation-ready
*/

/* ------------------------------------------------------------------
   1. Design tokens
------------------------------------------------------------------ */
:root {
  --sy-blue:        #4fb4e2;   /* brand blue, carried over from Shopify theme-color */
  --sy-blue-dark:   #2b8ab8;
  --sy-blue-tint:   #eaf6fc;
  --sy-navy:        #14313f;
  --sy-ink:         #22323b;
  --sy-muted:       #5f7480;
  --sy-line:        #dde5ea;
  --sy-bg:          #ffffff;
  --sy-bg-alt:      #f4f8fa;

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

  --sy-wrap: 1140px;
  --sy-gap: 24px;
  --sy-radius: 4px;
  --sy-shadow: 0 1px 3px rgba(20, 49, 63, .08), 0 8px 24px rgba(20, 49, 63, .06);
}

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

body {
  margin: 0;
  font-family: var(--sy-font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--sy-ink);
  background: var(--sy-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--sy-blue-dark); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--sy-font-head);
  color: var(--sy-navy);
  line-height: 1.2;
  margin: 0 0 .6em;
  font-weight: 600;
}
h1 { font-size: 2.4rem; letter-spacing: -.02em; }
h2 { font-size: 1.75rem; letter-spacing: -.01em; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin-bottom: .35em; }

hr { border: 0; border-top: 1px solid var(--sy-line); margin: 2.5rem 0; }

:focus-visible {
  outline: 3px solid var(--sy-blue);
  outline-offset: 2px;
}

.sy-skip-link {
  position: absolute; left: -9999px;
  background: var(--sy-navy); color: #fff;
  padding: 12px 20px; z-index: 999;
}
.sy-skip-link:focus { left: 12px; top: 12px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
}

/* ------------------------------------------------------------------
   3. Layout
------------------------------------------------------------------ */
.sy-wrap {
  width: 100%;
  max-width: var(--sy-wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.sy-main { padding: 56px 0 72px; }

.sy-section { padding: 64px 0; }
.sy-section--alt { background: var(--sy-bg-alt); }

/* ------------------------------------------------------------------
   4. Header
------------------------------------------------------------------ */
.sy-header {
  background: #fff;
  border-bottom: 1px solid var(--sy-line);
  position: sticky;
  top: 0;
  z-index: 100;
}
body.admin-bar .sy-header { top: 32px; }

.sy-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sy-gap);
  min-height: 76px;
}

.sy-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sy-font-head);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--sy-navy);
  text-decoration: none;
  line-height: 1.2;
}
.sy-brand:hover { text-decoration: none; color: var(--sy-blue-dark); }
.sy-brand img { max-height: 52px; width: auto; }
.sy-brand__mark {
  display: inline-block;
  width: 6px; height: 30px;
  background: var(--sy-blue);
  border-radius: 2px;
  flex: none;
}

/* Navigation */
.sy-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  align-items: center;
}
.sy-nav li { margin: 0; position: relative; }
.sy-nav a {
  display: block;
  padding: 10px 14px;
  font-size: .94rem;
  font-weight: 500;
  color: var(--sy-ink);
  border-radius: var(--sy-radius);
}
.sy-nav a:hover,
.sy-nav a:focus { background: var(--sy-blue-tint); color: var(--sy-navy); text-decoration: none; }
.sy-nav .current-menu-item > a,
.sy-nav .current_page_item > a {
  color: var(--sy-blue-dark);
  box-shadow: inset 0 -2px 0 var(--sy-blue);
}

/* Sub-menus */
.sy-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--sy-line);
  border-radius: var(--sy-radius);
  box-shadow: var(--sy-shadow);
  padding: 6px;
  flex-direction: column;
}
.sy-nav li:hover > .sub-menu,
.sy-nav li:focus-within > .sub-menu { display: flex; }

/* Mobile toggle */
.sy-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--sy-line);
  border-radius: var(--sy-radius);
  padding: 9px 12px;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  color: var(--sy-navy);
  align-items: center;
  gap: 8px;
}
.sy-nav-toggle__bars {
  display: inline-block;
  width: 18px; height: 2px;
  background: var(--sy-navy);
  position: relative;
}
.sy-nav-toggle__bars::before,
.sy-nav-toggle__bars::after {
  content: ""; position: absolute; left: 0;
  width: 18px; height: 2px; background: var(--sy-navy);
}
.sy-nav-toggle__bars::before { top: -6px; }
.sy-nav-toggle__bars::after  { top: 6px; }

/* ------------------------------------------------------------------
   5. Hero
------------------------------------------------------------------ */
.sy-hero {
  position: relative;
  background: var(--sy-navy);
  color: #fff;
  overflow: hidden;
}
.sy-hero__media {
  position: absolute;
  inset: 0;
}
.sy-hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .38;
}
.sy-hero__inner {
  position: relative;
  padding: 96px 0 100px;
  max-width: 760px;
}
.sy-hero__eyebrow {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--sy-blue);
  margin-bottom: 16px;
}
.sy-hero h1 {
  color: #fff;
  font-size: 3rem;
  margin-bottom: .4em;
}
.sy-hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,.88);
  margin-bottom: 1.8em;
  max-width: 620px;
}

/* ------------------------------------------------------------------
   6. Buttons
------------------------------------------------------------------ */
.sy-btn {
  display: inline-block;
  padding: 13px 26px;
  background: var(--sy-blue);
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid var(--sy-blue);
  border-radius: var(--sy-radius);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.sy-btn:hover, .sy-btn:focus {
  background: var(--sy-blue-dark);
  border-color: var(--sy-blue-dark);
  color: #fff;
  text-decoration: none;
}
.sy-btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.5);
}
.sy-btn--ghost:hover, .sy-btn--ghost--focus {
  background: rgba(255,255,255,.12);
  border-color: #fff;
}
.sy-btn--sm { padding: 9px 18px; font-size: .88rem; }

/* ------------------------------------------------------------------
   7. Service cards
------------------------------------------------------------------ */
.sy-section__head { max-width: 640px; margin-bottom: 40px; }
.sy-section__eyebrow {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--sy-blue-dark);
  display: block;
  margin-bottom: 10px;
}

.sy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sy-gap);
}

.sy-card {
  background: #fff;
  border: 1px solid var(--sy-line);
  border-radius: var(--sy-radius);
  padding: 28px 26px 26px;
  display: flex;
  flex-direction: column;
  border-top: 3px solid var(--sy-blue);
  transition: box-shadow .18s ease, transform .18s ease;
}
.sy-card:hover { box-shadow: var(--sy-shadow); transform: translateY(-2px); }
.sy-card h3 { margin-bottom: .5em; }
.sy-card p { color: var(--sy-muted); font-size: .96rem; flex: 1; }
.sy-card__link {
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-top: 8px;
}
.sy-card__link::after { content: " \2192"; }

/* ------------------------------------------------------------------
   8. Page content
------------------------------------------------------------------ */
.sy-page-header {
  background: var(--sy-bg-alt);
  border-bottom: 1px solid var(--sy-line);
  padding: 48px 0 44px;
}
.sy-page-header h1 { margin-bottom: 0; }
.sy-page-header p { color: var(--sy-muted); margin: .6em 0 0; max-width: 640px; }

.sy-content { max-width: 820px; }
.sy-content--wide { max-width: none; }

.sy-content h2 { margin-top: 1.8em; }
.sy-content h3 { margin-top: 1.5em; }
.sy-content > *:first-child { margin-top: 0; }

.sy-content img {
  border-radius: var(--sy-radius);
  margin: 1.6em 0;
}
.sy-content figure { margin: 1.6em 0; }
.sy-content figcaption { font-size: .88rem; color: var(--sy-muted); margin-top: .5em; }

.sy-content blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--sy-blue);
  color: var(--sy-muted);
}

.sy-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: .95rem;
}
.sy-content th, .sy-content td {
  border: 1px solid var(--sy-line);
  padding: 10px 14px;
  text-align: left;
}
.sy-content th { background: var(--sy-bg-alt); font-weight: 600; }

/* Callout used on quote/enquiry pages */
.sy-callout {
  background: var(--sy-blue-tint);
  border: 1px solid #bfe2f4;
  border-radius: var(--sy-radius);
  padding: 24px 26px;
  margin: 2em 0 0;
}
.sy-callout h3 { margin-bottom: .4em; }
.sy-callout p:last-child { margin-bottom: 0; }

/* Team members */
.sy-team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sy-gap);
  margin: 2em 0;
}
.sy-team__member {
  text-align: center;
  border: 1px solid var(--sy-line);
  border-radius: var(--sy-radius);
  padding: 26px 20px;
}
.sy-team__member img {
  width: 120px; height: 120px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 16px;
}
.sy-team__name { font-weight: 700; color: var(--sy-navy); margin-bottom: 2px; }
.sy-team__role { color: var(--sy-muted); font-size: .92rem; margin-bottom: 6px; }

/* ------------------------------------------------------------------
   9. Gallery
------------------------------------------------------------------ */
.sy-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sy-gallery li { margin: 0; }
.sy-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--sy-radius);
  border: 1px solid var(--sy-line);
  transition: transform .2s ease;
}
.sy-gallery a:hover img { transform: scale(1.02); }

/* Core WP gallery block, so the block editor matches */
.wp-block-gallery .wp-block-image img { border-radius: var(--sy-radius); }

/* ------------------------------------------------------------------
   10. Contact form
------------------------------------------------------------------ */
.sy-form { max-width: 620px; }
.sy-form__row { margin-bottom: 18px; }
.sy-form label {
  display: block;
  font-weight: 600;
  font-size: .92rem;
  color: var(--sy-navy);
  margin-bottom: 6px;
}
.sy-form input[type="text"],
.sy-form input[type="email"],
.sy-form input[type="tel"],
.sy-form textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--sy-ink);
  background: #fff;
  border: 1px solid var(--sy-line);
  border-radius: var(--sy-radius);
}
.sy-form input:focus,
.sy-form textarea:focus {
  border-color: var(--sy-blue);
  outline: 2px solid var(--sy-blue-tint);
}
.sy-form textarea { min-height: 160px; resize: vertical; }
.sy-form__hp { position: absolute; left: -9999px; }

.sy-notice {
  padding: 14px 18px;
  border-radius: var(--sy-radius);
  margin-bottom: 22px;
  font-size: .95rem;
}
.sy-notice--ok   { background: #e8f6ed; border: 1px solid #b7e0c6; color: #1d5c34; }
.sy-notice--err  { background: #fdecea; border: 1px solid #f5c2bd; color: #8c2f24; }

/* ------------------------------------------------------------------
   11. Contact strip
------------------------------------------------------------------ */
.sy-contact-strip {
  background: var(--sy-navy);
  color: #fff;
  padding: 44px 0;
}
.sy-contact-strip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.sy-contact-strip h2 { color: #fff; margin-bottom: .25em; }
.sy-contact-strip p { color: rgba(255,255,255,.82); margin: 0; }

/* ------------------------------------------------------------------
   12. Footer
------------------------------------------------------------------ */
.sy-footer {
  background: #0f2733;
  color: rgba(255,255,255,.75);
  padding: 56px 0 0;
  font-size: .95rem;
}
.sy-footer a { color: #9fd8f2; }
.sy-footer h4 {
  color: #fff;
  font-size: .82rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.sy-footer__cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
}
.sy-footer ul { list-style: none; margin: 0; padding: 0; }
.sy-footer li { margin-bottom: 9px; }
.sy-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 22px 0 26px;
  font-size: .88rem;
  color: rgba(255,255,255,.55);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
}
.sy-footer__contact strong { color: #fff; font-weight: 600; }

/* ------------------------------------------------------------------
   13. Search / 404
------------------------------------------------------------------ */
.sy-search-form { display: flex; gap: 8px; max-width: 480px; }
.sy-search-form input[type="search"] {
  flex: 1;
  padding: 11px 14px;
  border: 1px solid var(--sy-line);
  border-radius: var(--sy-radius);
  font-size: 1rem;
  font-family: inherit;
}
.sy-result { padding: 22px 0; border-bottom: 1px solid var(--sy-line); }
.sy-result h2 { font-size: 1.2rem; margin-bottom: .3em; }

/* ------------------------------------------------------------------
   14. Responsive
------------------------------------------------------------------ */
@media (max-width: 900px) {
  .sy-footer__cols { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 782px) {
  body.admin-bar .sy-header { top: 46px; }
}

@media (max-width: 768px) {
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.45rem; }

  .sy-nav-toggle { display: inline-flex; }
  .sy-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--sy-line);
    box-shadow: var(--sy-shadow);
    padding: 10px 20px 18px;
  }
  .sy-nav.is-open { display: block; }
  .sy-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .sy-nav a { padding: 12px 6px; border-bottom: 1px solid var(--sy-line); border-radius: 0; }
  .sy-nav .sub-menu {
    display: flex; position: static; border: 0; box-shadow: none;
    padding: 0 0 0 16px;
  }
  .sy-header__inner { position: relative; min-height: 66px; }

  .sy-hero__inner { padding: 64px 0 68px; }
  .sy-hero h1 { font-size: 2.1rem; }
  .sy-section { padding: 48px 0; }
  .sy-main { padding: 40px 0 56px; }
  .sy-footer__cols { grid-template-columns: 1fr; gap: 30px; }
}

/* ------------------------------------------------------------------
   15. Motion preferences
------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------------
   16. Print
------------------------------------------------------------------ */
@media print {
  .sy-header, .sy-footer, .sy-contact-strip, .sy-nav-toggle { display: none; }
  body { font-size: 12pt; color: #000; }
}
