/*
 * Technosales
 * Main stylesheet
 *
 * Contents
 *   1. Variables
 *   2. Base
 *   3. Buttons
 *   4. Header and navigation
 *   5. Hero
 *   6. Sections
 *   7. Products
 *   8. Suppliers
 *   9. About
 *  10. Call to action
 *  11. Branches and map
 *  12. Enquiry form
 *  13. Footer
 *  14. Responsive
 */


/* 1. Variables
   ========================================================================== */

:root {
  --purple: #33207f;
  --purple-deep: #1f1450;
  --purple-soft: #ece9f8;
  --orange: #e8781e;
  --orange-deep: #c9620f;
  --ink: #15131c;
  --muted: #5c5a68;
  --line: #e4e2ea;
  --bg: #ffffff;
  --bg-tint: #f6f5fa;
  --success: #1d7a3a;
  --error: #b3261e;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(31, 20, 80, 0.22);
  --wrap: 1180px;
}


/* 2. Base
   ========================================================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: "Jost", "Century Gothic", "Futura", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

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

.skip {
  position: absolute;
  top: 8px;
  left: -999px;
  z-index: 100;
  padding: 8px 14px;
  color: #fff;
  background: var(--purple);
}

.skip:focus {
  left: 8px;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-deep);
}

.eyebrow-light {
  color: #ffb070;
}

.lead {
  max-width: 560px;
  margin: 22px 0 32px;
  font-size: 19px;
  color: var(--muted);
}


/* 3. Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn-orange {
  color: #fff;
  background: var(--orange);
}

.btn-orange:hover {
  background: var(--orange-deep);
}

.btn-purple {
  color: #fff;
  background: var(--purple);
  box-shadow: var(--shadow);
}

.btn-purple:hover {
  background: var(--purple-deep);
}

.btn-ghost {
  color: var(--purple);
  background: transparent;
  border-color: var(--purple);
}

.btn-ghost:hover {
  background: var(--purple-soft);
}


/* 4. Header and navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 88px;
}

.brand img {
  width: auto;
  height: 62px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

.nav a {
  position: relative;
  padding: 4px 0;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.nav a::after {
  content: "";
  position: absolute;
  right: 100%;
  bottom: -2px;
  left: 0;
  height: 2px;
  background: var(--orange);
  transition: right 0.2s ease;
}

.nav a:hover::after,
.nav a.active::after {
  right: 0;
}

.nav .nav-login {
  padding: 9px 22px;
  font-weight: 600;
  color: #fff;
  background: var(--purple);
  border: 2px solid var(--purple);
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav .nav-login::after {
  display: none;
}

/* MiTSA logo: link to the client portal. */
.nav .nav-portal {
  display: inline-flex;
  align-items: center;
  padding: 0;
}

.nav .nav-portal::after {
  display: none;
}

.nav .nav-portal img {
  width: auto;
  height: 36px;
  transition: opacity 0.15s ease;
}

.nav .nav-portal:hover img {
  opacity: 0.8;
}

.nav .nav-login:hover {
  color: #fff;
  background: var(--purple-deep);
  border-color: var(--purple-deep);
}

.menu-toggle {
  display: none;
  padding: 8px;
  background: none;
  border: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}


/* 5. Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding: 136px 0 128px;
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, var(--bg-tint) 100%);
}

.hero-swooshes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-swooshes .swoosh-purple {
  fill: var(--purple);
}

.hero-swooshes .swoosh-orange {
  fill: var(--orange);
}

/* On load the swooshes sweep in and land: purple from the right, orange
   from the left. While scrolling, script.js lets them drift a little. */
.hero-swooshes path {
  transform-box: fill-box;
  animation: 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.hero-swooshes .swoosh-purple {
  transform-origin: right center;
  animation-name: swoosh-in-right;
}

.hero-swooshes .swoosh-orange {
  transform-origin: left center;
  animation-name: swoosh-in-left;
  animation-delay: 0.3s;
}

.swoosh-layer {
  will-change: transform;
}

@keyframes swoosh-in-right {
  from {
    opacity: 0;
    transform: translateX(70%) scaleX(0.4);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes swoosh-in-left {
  from {
    opacity: 0;
    transform: translateX(-70%) scaleX(0.4);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-swooshes path {
    animation: none;
  }
}

.hero-inner {
  position: relative;
}

.hero-copy {
  max-width: 760px;
  margin: 0 auto;
}

.hero .lead {
  margin-right: auto;
  margin-left: auto;
}

.hero .eyebrow {
  font-size: 18px;
  letter-spacing: 0.12em;
}

.hero h1 {
  font-size: clamp(40px, 5.6vw, 66px);
}

.tagline {
  font-family: "Yellowtail", "Brush Script MT", cursive;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.1;
  -webkit-text-stroke: 0.02em currentColor;
}

.hero h1.tagline {
  font-size: clamp(36px, 4.4vw, 56px);
}

.welcome {
  max-width: 720px;
  margin: 28px auto 0;
  font-size: 18px;
  color: var(--muted);
}

.welcome h2 {
  margin-bottom: 14px;
  font-size: clamp(26px, 3vw, 34px);
  color: var(--ink);
}

.welcome p {
  margin: 0 0 14px;
}

.welcome .welcome-signoff {
  margin: 22px 0 0;
  font-weight: 500;
  color: var(--ink);
}

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

.page-hero {
  padding: 64px 0 48px;
  background: linear-gradient(180deg, #fff 0%, var(--bg-tint) 100%);
}

.page-hero h1 {
  max-width: 760px;
  font-size: clamp(34px, 4.4vw, 52px);
}

.page-hero .lead {
  margin-bottom: 0;
}

.not-found {
  min-height: calc(100vh - 220px);
  display: flex;
  align-items: center;
}

.not-found .wrap {
  width: 100%;
}

.not-found .lead {
  margin-bottom: 32px;
}

.site-footer .footer-bottom:only-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}


/* 6. Sections
   ========================================================================== */

.section {
  padding: 96px 0;
}

.section-tint {
  background: var(--bg-tint);
}

.section-tight {
  padding-top: 48px;
}

.section-head {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-head-center {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-tight .section-head {
  margin-bottom: 28px;
}

.section-head h2,
.contact-info h2,
.about-layout h2 {
  font-size: clamp(30px, 3.6vw, 44px);
}

.section-sub {
  margin: 14px 0 0;
  font-size: 18px;
  color: var(--muted);
}


/* 7. Products
   ========================================================================== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.product {
  padding: 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.product:hover {
  border-color: transparent;
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.product .icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  background: var(--purple-soft);
  border-radius: 12px;
}

.product .icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--purple);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product:hover .icon {
  background: var(--orange);
}

.product:hover .icon svg {
  stroke: #fff;
}

.product h3 {
  margin-bottom: 8px;
  font-size: 21px;
}

.product p {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}


/* 8. Suppliers
   ========================================================================== */

.brand-grid {
  --brand-columns: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.brand-grid li {
  flex: 0 0 calc((100% - (var(--brand-columns) - 1) * 14px) / var(--brand-columns));
}

.brand-grid li > * {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 110px;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}

.brand-grid a:hover {
  border-color: var(--purple);
}

.brand-grid img {
  width: 100%;
  height: 100%;
  max-width: 170px;
  max-height: 64px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.brand-grid a:hover img {
  transform: scale(1.05);
}


/* 9. About
   ========================================================================== */

.section-dark {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--purple-deep);
}

.section-dark::after {
  content: "";
  position: absolute;
  right: -300px;
  bottom: -40px;
  width: 900px;
  height: 200px;
  border-bottom: 18px solid var(--orange);
  border-radius: 50%;
  opacity: 0.8;
  transform: rotate(-8deg);
}

.about-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: center;
}

.about-text {
  margin-top: 20px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.why {
  padding: 24px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
}

.why h3 {
  margin-bottom: 6px;
  font-size: 19px;
}

.why h3::before {
  content: "";
  display: block;
  width: 28px;
  height: 4px;
  margin-bottom: 14px;
  background: var(--orange);
  border-radius: 2px;
}

.why p {
  margin: 0;
  font-size: 15.5px;
  color: rgba(255, 255, 255, 0.75);
}


/* 10. Call to action
   ========================================================================== */

.cta-band {
  padding: 56px 0;
  background: var(--purple-soft);
}

.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.cta-band h2 {
  font-size: clamp(26px, 3vw, 34px);
}

.cta-band p {
  margin: 8px 0 0;
  color: var(--muted);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}


/* 11. Branches and map
   ========================================================================== */

.branches-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: start;
}

.map-card {
  position: sticky;
  top: 100px;
  margin: 0;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.map-card figcaption {
  padding-top: 6px;
  font-size: 14px;
  text-align: center;
  color: var(--muted);
}

#sa-map {
  display: block;
  width: 100%;
  height: auto;
}

#sa-map .land {
  fill: var(--purple-soft);
  stroke: #c9c2ea;
  stroke-width: 2;
  stroke-linejoin: round;
}

#sa-map .lesotho {
  fill: #fff;
  stroke: #c9c2ea;
  stroke-width: 1.5;
}

#sa-map .leader {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

#sa-map .ocean-label {
  font: italic 500 14px "Jost", sans-serif;
  letter-spacing: 0.1em;
  fill: #a6a2bb;
}

#sa-map .pin {
  cursor: pointer;
}

#sa-map .pin .halo {
  fill: var(--orange);
  opacity: 0.22;
}

#sa-map .pin .core {
  fill: var(--orange);
  stroke: #fff;
  stroke-width: 3;
  transition: fill 0.2s ease;
}

#sa-map .pin text {
  font: 600 17px "Jost", sans-serif;
  fill: var(--ink);
}

#sa-map .pin text.hq,
#sa-map .pin.active text {
  fill: var(--purple);
}

#sa-map .pin:hover .core,
#sa-map .pin.active .core {
  fill: var(--purple);
}

#sa-map .pin.active .halo {
  fill: var(--purple);
  opacity: 0.25;
  animation: pulse 1.6s ease-out infinite;
}

@keyframes pulse {
  0% {
    r: 10;
    opacity: 0.35;
  }
  100% {
    r: 26;
    opacity: 0;
  }
}

.branch-list {
  display: grid;
  gap: 14px;
}

.branch {
  padding: 20px 22px;
  background: #fff;
  border: 2px solid transparent;
  border-radius: var(--radius);
  box-shadow: 0 1px 0 var(--line);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.branch:hover {
  box-shadow: var(--shadow);
}

.branch.active {
  border-color: var(--purple);
  box-shadow: var(--shadow);
}

.branch header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.branch h3 {
  font-size: 21px;
}

.tag {
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--orange);
  border-radius: 999px;
}

.tag-soft {
  color: var(--purple);
  background: var(--purple-soft);
}

.addr {
  margin: 0 0 12px;
  font-size: 15.5px;
  color: var(--muted);
}

.branch-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.branch-actions a {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--purple);
  text-decoration: none;
}

.branch-actions a:hover {
  color: var(--orange-deep);
}

.branch-actions .dir::after {
  content: " \2192";
}

.branch-actions .enquire {
  margin-left: auto;
  padding: 3px 12px;
  font-size: 14px;
  color: var(--orange-deep);
  border: 1.5px solid currentColor;
  border-radius: 999px;
}

.branch-actions .enquire:hover {
  color: #fff;
  background: var(--orange);
  border-color: var(--orange);
}


/* 12. Enquiry form
   ========================================================================== */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 56px;
  align-items: start;
}

.contact-list {
  display: grid;
  gap: 18px;
  margin: 30px 0 0;
}

.contact-list div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
}

.contact-list dt {
  font-weight: 600;
  color: var(--muted);
}

.contact-list dd {
  margin: 0;
}

.contact-list a {
  font-weight: 600;
  color: var(--purple);
  text-decoration: none;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 32px;
  background: var(--bg-tint);
  border-radius: 20px;
}

.contact-form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: transparent;
  outline: 2px solid var(--purple);
  outline-offset: 1px;
}

.contact-form button {
  justify-self: start;
}

.contact-form button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.contact-form .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  min-height: 1.2em;
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.form-note.success {
  font-weight: 500;
  color: var(--success);
}

.form-note.error {
  color: var(--error);
}


/* 13. Footer
   ========================================================================== */

.site-footer {
  padding: 32px 0 18px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
  background: var(--ink);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
}

.footer-grid > div:first-child ul {
  grid-template-columns: repeat(2, auto);
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  justify-content: start;
  column-gap: 40px;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #fff;
  border-radius: 10px;
}

.footer-tagline {
  margin: 6px 0 0;
  font-family: "Yellowtail", "Brush Script MT", cursive;
  font-size: 26px;
  line-height: 1.2;
  color: #fff;
}

.footer-logo img {
  width: auto;
  height: 40px;
}

.site-footer h4 {
  margin-bottom: 10px;
  font-size: 16px;
  color: #fff;
}

.site-footer ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--orange);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 14px;
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}


/* 14. Responsive
   ========================================================================== */

@media (max-width: 1000px) {
  .hero-inner,
  .branches-layout,
  .about-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .map-card {
    position: static;
  }

  .product-grid {
    grid-template-columns: 1fr 1fr;
  }

  .brand-grid {
    --brand-columns: 3;
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .nav {
    position: absolute;
    top: 88px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .nav a::after {
    display: none;
  }

  .nav .nav-login {
    margin-top: 12px;
    text-align: center;
  }

  .nav .nav-portal {
    justify-content: center;
    padding: 12px 0 4px;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .wrap {
    padding: 0 16px;
  }

  .brand img {
    height: 48px;
  }

  .header-inner {
    height: 72px;
  }

  .nav {
    top: 72px;
  }

  .hero .eyebrow {
    font-size: 15px;
  }

  .hero {
    padding: 56px 0 88px;
  }

  .hero-swooshes .swoosh-purple {
    display: none;
  }

  .page-hero {
    padding: 44px 0 32px;
  }

  .section {
    padding: 72px 0;
  }

  .contact-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .product-grid,
  .why-grid,
  .contact-form .row {
    grid-template-columns: 1fr;
  }

  .brand-grid {
    --brand-columns: 2;
  }

  .brand-grid li > * {
    height: 90px;
    padding: 12px 14px;
  }

  .brand-grid img {
    max-height: 50px;
  }

  .branch-actions .enquire {
    margin-left: 0;
  }

  .contact-form {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
