/*
Theme Name: Sail Wayak
Theme URI: https://wayak.co.za
Author: Allsorts Web Designers
Author URI: https://allsortswebdesigners.co.za
Description: Custom theme for Sail Wayak Pty Ltd — composite manufacturing (carbon fibre, fibreglass, plastic wear parts, wood, CNC and finishing) from concept to final product.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: sail-wayak
*/

:root {
  /* --sw-gray is measured directly from the logo file's opaque pixels
     (rgb 191,191,192 / #BFBFC0). The logo itself is a single flat grey with
     alpha-blended anti-aliasing, not a multi-tone gradient — the darker
     shades below (charcoal/graphite/steel) are a UI palette derived from
     that one brand grey for contrast on white, not separate sampled tones. */
  --sw-white: #ffffff;
  --sw-bg-alt: #f6f7f8;
  --sw-ink: #1b1d1f;
  --sw-ink-soft: #4b4f54;
  --sw-charcoal: #34363a;
  --sw-graphite: #5a5e66;
  --sw-steel: #86898f;
  --sw-gray: #bfbfc0;        /* measured logo grey */
  --sw-gray-dark: #767676;
  --sw-gray-light: #d9dadb;
  --sw-silver-pale: #c7c8ca;
  --sw-border: #e4e5e7;
  --sw-accent: #5a5e66;
  --sw-accent-dark: #34363a;
  --sw-radius: 10px;
  --sw-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sw-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: var(--sw-accent);
  text-decoration: none;
}

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sw-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sw-accent);
  margin-bottom: 14px;
}

.kicker::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--sw-steel);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}

.btn-primary,
.btn-nav-cta,
.cta-band .btn-primary {
  background-color: #0a0a0a;
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.22) 0, rgba(255, 255, 255, 0.22) 2px, transparent 2px, transparent 7px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.22) 0, rgba(255, 255, 255, 0.22) 2px, transparent 2px, transparent 7px),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.6) 0, rgba(0, 0, 0, 0.6) 3px, transparent 3px, transparent 7px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.6) 0, rgba(0, 0, 0, 0.6) 3px, transparent 3px, transparent 7px);
  color: var(--sw-white);
}

.btn-primary:hover,
.btn-nav-cta:hover,
.cta-band .btn-primary:hover {
  background-color: #000000;
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.28) 0, rgba(255, 255, 255, 0.28) 2px, transparent 2px, transparent 7px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.28) 0, rgba(255, 255, 255, 0.28) 2px, transparent 2px, transparent 7px),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.6) 0, rgba(0, 0, 0, 0.6) 3px, transparent 3px, transparent 7px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.6) 0, rgba(0, 0, 0, 0.6) 3px, transparent 3px, transparent 7px);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--sw-charcoal);
  border-color: var(--sw-charcoal);
}

.btn-outline:hover {
  border-color: var(--sw-ink);
  color: var(--sw-ink);
  background: var(--sw-bg-alt);
  transform: translateY(-1px);
}

/* ---------- Top bar ---------- */

.top-bar {
  background: var(--sw-bg-alt);
  border-bottom: 1px solid var(--sw-border);
  color: var(--sw-ink-soft);
  font-size: 13.5px;
  font-family: var(--sw-mono);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.top-bar-inner a {
  color: var(--sw-ink);
  font-weight: 600;
}

.top-bar-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--sw-charcoal);
  position: sticky;
  top: 0;
  background: var(--sw-graphite);
  z-index: 50;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sw-ink);
}

.site-branding img.custom-logo,
.site-logo-img {
  max-height: 46px;
  width: auto;
}

.site-branding .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.site-title {
  font-size: 21px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: -0.01em;
}

.site-tagline {
  font-family: var(--sw-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sw-gray-dark);
  margin-top: 3px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--sw-border);
  border-radius: 6px;
}

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

.primary-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  color: #d3d5d8;
  font-weight: 500;
  font-size: 14.5px;
}

.primary-nav a:hover {
  color: var(--sw-white);
}

.btn-nav-cta {
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 100px 0 90px;
  overflow: hidden;
  background:
    linear-gradient(var(--sw-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--sw-border) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: center -1px;
  -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
}

.hero-inner {
  position: relative;
  -webkit-mask-image: none;
  mask-image: none;
}

.hero .container {
  max-width: 1180px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: stretch;
  gap: 40px;
  text-align: left;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
}

.hero h1 em {
  font-style: italic;
  color: var(--sw-charcoal);
}

/* ---------- Page hero (Process / Why / Contact standalone pages) ---------- */

.page-hero {
  position: relative;
  padding: 68px 0 54px;
  overflow: hidden;
  background:
    linear-gradient(var(--sw-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--sw-border) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: center -1px;
  -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
}

.page-hero .container {
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: stretch;
  gap: 40px;
  text-align: left;
  position: relative;
}

.page-hero h1 {
  font-size: clamp(30px, 4.2vw, 44px);
  font-weight: 800;
}

.page-hero p {
  color: var(--sw-ink-soft);
  font-size: 17px;
}

/* ---------- Shared hero logo column (hero + page-hero) ---------- */

.hero-copy,
.page-hero-copy {
  text-align: left;
}

.hero-logo,
.page-hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo img,
.page-hero-logo img {
  width: 100%;
  max-width: 300px;
  height: auto;
  object-fit: contain;
}

.hero-lead {
  font-size: 18.5px;
  color: var(--sw-ink-soft);
  max-width: 520px;
  margin: 0 0 34px;
}

.hero-actions {
  display: flex;
  justify-content: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 46px;
}

.hero-strip {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--sw-mono);
  font-size: 12.5px;
  color: var(--sw-gray-dark);
}

.hero-strip span {
  padding: 6px 14px;
  border: 1px solid var(--sw-gray);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--sw-ink-soft);
}

/* ---------- Sections ---------- */

section {
  padding: 84px 0;
}

.section-alt {
  background: var(--sw-bg-alt);
  border-top: 1px solid var(--sw-border);
  border-bottom: 1px solid var(--sw-border);
}

.section-head {
  max-width: 620px;
  margin: 0 0 48px;
}

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

.section-head h2 {
  font-size: clamp(26px, 3.4vw, 36px);
}

.section-head p {
  color: var(--sw-ink-soft);
  font-size: 16.5px;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: stretch;
}

.about-copy p {
  color: var(--sw-ink-soft);
  font-size: 16px;
}

.about-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.about-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 600;
  font-size: 15px;
}

.about-list svg {
  flex: none;
  color: var(--sw-accent);
  margin-top: 2px;
}

.stat-card {
  border: 1px solid var(--sw-graphite);
  border-radius: var(--sw-radius);
  padding: 26px 24px;
  background: var(--sw-graphite);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-card .kicker {
  color: #d3d5d8;
}

.stat-card .kicker::before {
  background: #d3d5d8;
}

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

.stat-number {
  font-size: 30px;
  font-weight: 800;
  color: var(--sw-white);
}

.stat-number span {
  color: #d3d5d8;
}

.stat-label {
  font-family: var(--sw-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c3c5c8;
  margin-top: 4px;
}

/* ---------- Services ---------- */

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

.work-photo {
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid var(--sw-border);
  border-radius: var(--sw-radius);
  overflow: hidden;
}

.work-photo img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery-item {
  border: 1px solid var(--sw-border);
  border-radius: var(--sw-radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.service-card {
  border: 1px solid var(--sw-graphite);
  border-radius: var(--sw-radius);
  padding: 30px 26px;
  background: var(--sw-graphite);
  transition: border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.service-card:hover {
  border-color: var(--sw-charcoal);
  background: var(--sw-charcoal);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(20, 20, 20, 0.16);
}

.service-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--sw-bg-alt);
  border: 1px solid var(--sw-border);
  color: var(--sw-graphite);
  margin-bottom: 18px;
}

.service-card:nth-child(3n+2) .service-icon { color: var(--sw-charcoal); }
.service-card:nth-child(3n+3) .service-icon { color: var(--sw-steel); }

.service-card h3 {
  font-size: 18px;
  color: var(--sw-white);
}

.service-card p {
  color: #d3d5d8;
  font-size: 14.5px;
  margin: 0;
}

/* ---------- Process ---------- */

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--sw-border);
  border-radius: var(--sw-radius);
  overflow: hidden;
}

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

.process-step {
  padding: 30px 26px;
  border-right: 1px solid var(--sw-border);
  background: var(--sw-white);
}

.process-step:last-child {
  border-right: none;
}

.process-num {
  font-family: var(--sw-mono);
  font-size: 13px;
  color: var(--sw-graphite);
  margin-bottom: 14px;
}

.process-step:nth-child(2) .process-num { color: var(--sw-charcoal); }
.process-step:nth-child(3) .process-num { color: var(--sw-steel); }
.process-step:nth-child(4) .process-num { color: var(--sw-gray-dark); }

.process-step h3 {
  font-size: 16.5px;
}

.process-step p {
  color: var(--sw-ink-soft);
  font-size: 14px;
  margin: 0;
}

/* ---------- Why us ---------- */

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 24px;
}

.why-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.why-icon {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--sw-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sw-graphite);
}

.why-item:nth-child(3n+2) .why-icon { color: var(--sw-charcoal); border-color: var(--sw-gray-light); }
.why-item:nth-child(3n+3) .why-icon { color: var(--sw-steel); border-color: var(--sw-gray-light); }

.why-item h4 {
  font-size: 15.5px;
  margin-bottom: 4px;
}

.why-item p {
  font-size: 13.5px;
  color: var(--sw-ink-soft);
  margin: 0;
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--sw-bg-alt);
  border-top: 1px solid var(--sw-border);
  border-bottom: 1px solid var(--sw-border);
  padding: 64px 0;
  text-align: center;
  position: relative;
  background-image:
    linear-gradient(var(--sw-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--sw-border) 1px, transparent 1px);
  background-size: 44px 44px;
}

.cta-band h2 {
  font-size: clamp(24px, 3vw, 32px);
  color: var(--sw-ink);
}

.cta-band p {
  color: var(--sw-ink-soft);
  max-width: 520px;
  margin: 0 auto 30px;
}


/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-card {
  border: 1px solid var(--sw-graphite);
  border-radius: var(--sw-radius);
  padding: 28px;
  background: var(--sw-graphite);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-card .service-icon {
  margin-bottom: 0;
}

.contact-card h4 {
  font-size: 14px;
  font-family: var(--sw-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c3c5c8;
  margin-bottom: 6px;
}

.contact-card p, .contact-card a {
  font-size: 15.5px;
  color: var(--sw-white);
  margin: 0;
}

.contact-cards {
  display: grid;
  gap: 16px;
}

.contact-map {
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--sw-border);
  border-radius: var(--sw-radius);
  overflow: hidden;
  background: var(--sw-white);
}

.contact-map iframe {
  flex: 1;
  min-height: 260px;
  filter: grayscale(100%) contrast(1.02);
}

.contact-map-footer {
  padding: 18px 22px;
  border-top: 1px solid var(--sw-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--sw-ink-soft);
}

.contact-map-footer strong {
  color: var(--sw-ink);
}

.contact-map-footer a {
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--sw-bg-alt);
  border-top: 1px solid var(--sw-border);
  padding: 50px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 34px;
}

.footer-logo-img {
  max-height: 56px;
  width: auto;
  display: block;
  filter: brightness(0);
  opacity: 0.85;
}

.footer-brand p {
  color: var(--sw-ink-soft);
  font-size: 14px;
  margin-top: 14px;
  max-width: 320px;
}

.footer-col h5 {
  font-family: var(--sw-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sw-gray-dark);
  margin: 0 0 14px;
}

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

.footer-col a {
  color: var(--sw-ink-soft);
  font-size: 14.5px;
}

.footer-col a:hover {
  color: var(--sw-accent);
}

.footer-bottom {
  border-top: 1px solid var(--sw-border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--sw-gray-dark);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero .container,
  .page-hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 28px;
  }

  .hero-copy,
  .page-hero-copy {
    text-align: center;
  }

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

  .hero-actions,
  .hero-strip {
    justify-content: center;
  }

  .hero-logo img,
  .page-hero-logo img {
    max-width: 220px;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .services-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-step {
    border-bottom: 1px solid var(--sw-border);
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--sw-border);
    flex-direction: column;
    align-items: stretch;
    padding: 18px 24px 24px;
    gap: 18px;
    display: none;
  }

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

  .primary-nav a {
    color: var(--sw-ink-soft);
  }

  .primary-nav a:hover {
    color: var(--sw-ink);
  }

  .primary-nav ul {
    flex-direction: column;
    gap: 16px;
  }

  .top-bar-inner {
    justify-content: center;
    text-align: center;
  }

  .services-grid,
  .why-grid,
  .process-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .process-step {
    border-right: none;
  }

  .hero {
    padding: 70px 0 60px;
  }

  section {
    padding: 60px 0;
  }
}
