/*
Theme Name: Tech Consultant
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A corporate, blueprint-inspired WordPress theme for a custom software / ERP / MIS development studio. White and blue palette, no icons, no gradients, no emoji.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: software-studio
*/

/* ==========================================================================
   0. Design tokens
   ========================================================================== */

:root{
  /* colour */
  --navy:        #0B2A4A;   /* header / footer / dark bands */
  --navy-ink:    #12202E;   /* body text */
  --blue:        #0F5FCE;   /* primary accent / links / CTAs */
  --blue-dim:    #2C6FB0;   /* hover state */
  --blue-pale:   #EEF3FA;   /* light section backgrounds */
  --line:        #D3DCE6;   /* hairline borders */
  --line-dark:   rgba(255,255,255,.16);
  --white:       #FFFFFF;
  --muted:       #55677A;

  /* type */
  --font-head: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  /* scale */
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 1.9rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 2.75rem);
  --step-4: clamp(2.6rem, 2rem + 3vw, 4rem);

  --container: 1200px;
  --gutter: clamp(1.25rem, 1rem + 2vw, 3rem);
  --radius: 2px; /* near-zero radius: technical / drafted, not soft */
}

/* ==========================================================================
   1. Reset & base
   ========================================================================== */

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--white);
  color: var(--navy-ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; display: block; }
a{ color: var(--blue); text-decoration: none; }
a:hover{ color: var(--blue-dim); }
ul{ margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4{
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin: 0 0 0.6em;
}
h1{ font-size: var(--step-4); }
h2{ font-size: var(--step-3); }
h3{ font-size: var(--step-2); }
h4{ font-size: var(--step-1); }
p{ margin: 0 0 1.1em; }
p:last-child{ margin-bottom: 0; }

:focus-visible{
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.container{
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow{
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--blue);
  text-transform: none;
  margin-bottom: 0.9em;
}
.eyebrow::before{ content: "/ "; color: var(--muted); }

.section{ padding-block: clamp(3.5rem, 3rem + 3vw, 6.5rem); }
.section--pale{ background: var(--blue-pale); }
.section--navy{ background: var(--navy); color: #DCE6F2; }
.section--navy h2, .section--navy h3{ color: var(--white); }
.section--navy .eyebrow{ color: #6FA8E8; }
.section-head{ max-width: 46rem; margin-bottom: clamp(2rem, 1.6rem + 2vw, 3.5rem); }
.section-head p{ color: var(--muted); font-size: var(--step-1); }
.section--navy .section-head p{ color: #B9CADB; }

hr.rule{
  border: none;
  border-top: 1px solid var(--line);
  margin: clamp(2.5rem, 2rem + 2vw, 4.5rem) 0;
}

/* ==========================================================================
   2. Signature device — drafted corner brackets
   Recurring motif standing in for icons/illustration: technical corner
   brackets, like registration marks on an engineering drawing.
   ========================================================================== */

.bracketed{
  position: relative;
  padding: clamp(1.5rem, 1.2rem + 1.5vw, 2.75rem);
  border: 1px solid var(--line);
}
.bracketed::before, .bracketed::after{
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--blue);
  border-style: solid;
}
.bracketed::before{ top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.bracketed::after{ bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.section--navy .bracketed{ border-color: var(--line-dark); }

.grid-field{
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center;
}
.section--navy .grid-field{
  background-image:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
}

/* ==========================================================================
   3. Buttons
   ========================================================================== */

.btn{
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  padding: 0.95em 1.6em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary{ background: var(--blue); color: var(--white); }
.btn-primary:hover{ background: var(--blue-dim); color: var(--white); }
.btn-outline{ background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover{ background: var(--navy); color: var(--white); }
.section--navy .btn-outline{ color: var(--white); border-color: var(--line-dark); }
.section--navy .btn-outline:hover{ background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-row{ display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.75rem; }

/* ==========================================================================
   4. Site header
   ========================================================================== */

.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header .container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.site-logo{
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.site-logo span{ color: var(--blue); }

.primary-nav ul{ display: flex; align-items: center; gap: clamp(1.1rem, 0.8rem + 1vw, 2.1rem); }
.primary-nav a{
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--navy-ink);
  padding: 0.4em 0;
  border-bottom: 1px solid transparent;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a{
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.primary-nav .btn{ margin-left: 0.5rem; }

.nav-toggle{
  display: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: none;
  border: 1px solid var(--line);
  padding: 0.5em 0.9em;
  cursor: pointer;
}

@media (max-width: 860px){
  .nav-toggle{ display: inline-flex; }
  .primary-nav{
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .primary-nav.is-open{ display: block; }
  .primary-nav .container{ padding: 0; }
  .primary-nav ul{ flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--gutter) 1.5rem; }
  .primary-nav li{ border-bottom: 1px solid var(--line); }
  .primary-nav a{ display: block; padding: 0.9em 0; }
  .primary-nav .btn{ margin: 1rem 0 0; width: 100%; justify-content: center; }
}

/* ==========================================================================
   5. Hero
   ========================================================================== */

.hero{
  padding-block: clamp(3.5rem, 3rem + 4vw, 7rem);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.hero-grid{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 1.5rem + 2vw, 4rem);
  align-items: center;
}
.hero h1{ max-width: 14ch; }
.hero .lede{ font-size: var(--step-1); color: var(--muted); max-width: 42ch; margin-top: 1em; }
.hero-panel{
  aspect-ratio: 4 / 3;
  display: flex; flex-direction: column; justify-content: space-between;
}
.hero-panel .coord{ font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); display: flex; justify-content: space-between; }
.hero-panel .stat{ font-family: var(--font-head); font-weight: 600; }
.hero-stats{ display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.hero-stats dt{ font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-bottom: 0.3em; }
.hero-stats dd{ margin: 0; font-family: var(--font-head); font-size: var(--step-2); font-weight: 600; color: var(--navy); }

@media (max-width: 900px){
  .hero-grid{ grid-template-columns: 1fr; }
}

/* ==========================================================================
   6. Cards — industries / services / projects
   ========================================================================== */

.card-grid{ display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card-grid--2{ grid-template-columns: repeat(2, 1fr); }
.card-grid--3{ grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px){ .card-grid--3{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px){ .card-grid--3, .card-grid--2{ grid-template-columns: 1fr; } }

.card{
  background: var(--white);
  padding: clamp(1.5rem, 1.2rem + 1vw, 2.25rem);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.card .idx{ font-family: var(--font-mono); font-size: 0.78rem; color: var(--blue); margin-bottom: 1rem; }
.card h3{ font-size: var(--step-1); margin-bottom: 0.5em; }
.card p{ color: var(--muted); flex-grow: 1; }
.card a.card-link{
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--navy);
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.card a.card-link:hover{ color: var(--blue); }

.project-card{ background: var(--white); }
.project-card .thumb{
  border-bottom: 1px solid var(--line);
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--blue-pale);
}
.project-card .thumb img{ width: 100%; height: 100%; object-fit: cover; }
.project-card .body{ padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); }
.project-card .meta{ font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-bottom: 0.6em; }
.project-card h3{ font-size: var(--step-1); margin-bottom: 0.4em; }
.project-card p{ color: var(--muted); }

/* ==========================================================================
   7. CTA band
   ========================================================================== */

.cta-band{
  background: var(--navy);
  color: var(--white);
  padding-block: clamp(2.5rem, 2rem + 2vw, 4rem);
}
.cta-band .container{
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.cta-band h3{ color: var(--white); margin-bottom: 0.25em; }
.cta-band p{ color: #B9CADB; margin: 0; }

/* ==========================================================================
   8. Forms
   ========================================================================== */

.form-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-grid .full{ grid-column: 1 / -1; }
@media (max-width: 700px){ .form-grid{ grid-template-columns: 1fr; } }

.field label{
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.5em;
}
.field input,
.field select,
.field textarea{
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.85em 1em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy-ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus{ outline: none; border-color: var(--blue); }
.field textarea{ min-height: 140px; resize: vertical; }

.contact-info{ font-family: var(--font-mono); font-size: 0.9rem; }
.contact-info dt{ color: var(--muted); margin-top: 1.25rem; }
.contact-info dt:first-child{ margin-top: 0; }
.contact-info dd{ margin: 0.25em 0 0; color: var(--navy); }

/* WhatsApp persistent button (mobile) */
.wa-float{
  position: fixed;
  right: 1.1rem; bottom: 1.1rem;
  z-index: 60;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 0.85em 1.2em;
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  display: none;
}
@media (max-width: 700px){ .wa-float{ display: inline-flex; } }

/* ==========================================================================
   9. Single project / page content
   ========================================================================== */

.page-hero{
  background: var(--blue-pale);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem);
}
.page-hero .eyebrow{ margin-bottom: 0.6em; }
.page-hero h1{ max-width: 24ch; }

.content-columns{
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: clamp(2rem, 1.5rem + 2vw, 4rem);
}
@media (max-width: 900px){ .content-columns{ grid-template-columns: 1fr; } }

.spec-table{ width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.spec-table th, .spec-table td{
  text-align: left;
  padding: 0.85em 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.spec-table th{
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--muted);
  width: 40%;
}

.module-list li{
  border-top: 1px solid var(--line);
  padding: 1.1em 0;
  display: flex;
  gap: 1rem;
}
.module-list li:last-child{ border-bottom: 1px solid var(--line); }
.module-list .idx{ font-family: var(--font-mono); color: var(--blue); font-size: 0.85rem; flex-shrink: 0; width: 3ch; }

.faq-item{ border-top: 1px solid var(--line); padding: 1.4em 0; }
.faq-item:last-child{ border-bottom: 1px solid var(--line); }
.faq-item h4{ margin-bottom: 0.4em; }
.faq-item p{ color: var(--muted); }

.tags-row{ display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.tag{
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--navy);
  border: 1px solid var(--line);
  padding: 0.35em 0.75em;
  border-radius: var(--radius);
}

/* ==========================================================================
   10. Footer
   ========================================================================== */

.site-footer{ background: var(--navy); color: #B9CADB; }
.site-footer .container{
  padding-block: clamp(2.5rem, 2rem + 2vw, 4rem);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 800px){ .site-footer .container{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px){ .site-footer .container{ grid-template-columns: 1fr; } }
.site-footer h4{
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 400;
  margin-bottom: 1rem;
}
.site-footer .footer-logo{ font-family: var(--font-head); font-weight: 600; color: var(--white); font-size: 1.1rem; margin-bottom: 0.75rem; }
.site-footer p{ color: #8FA6BE; font-size: 0.92rem; }
.site-footer ul li{ margin-bottom: 0.6em; }
.site-footer a{ color: #B9CADB; font-size: 0.92rem; }
.site-footer a:hover{ color: var(--white); }
.footer-bottom{
  border-top: 1px solid var(--line-dark);
}
.footer-bottom .container{
  display: flex; justify-content: space-between; padding-block: 1.25rem;
  font-family: var(--font-mono); font-size: 0.78rem; color: #7E96AF;
  grid-template-columns: none;
}

/* ==========================================================================
   11. Back to top
   ========================================================================== */

.back-to-top{
  position: fixed;
  right: 1.1rem;
  bottom: 2.5rem;
  z-index: 60;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.back-to-top.is-visible{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover{
  background: var(--blue);
  border-color: var(--blue);
}

/* ==========================================================================
   12. Contact form
   ========================================================================== */

.contact-form{
  background: var(--white);
  border: 1px solid var(--line);
  padding: clamp(1.5rem, 1.2rem + 1vw, 2.25rem);
}
.contact-form .field label{
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.5em;
}
.contact-form .field input,
.contact-form .field select,
.contact-form .field textarea{
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.85em 1em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy-ink);
  transition: border-color .15s ease;
}
.contact-form .field input:focus,
.contact-form .field select:focus,
.contact-form .field textarea:focus{
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(15, 95, 206, 0.1);
}
.contact-form .field textarea{
  min-height: 140px;
  resize: vertical;
}
#contact-status.success{
  color: #1a7f4e;
}
#contact-status.error{
  color: #c0392b;
}
#contact-form.is-submitting #contact-submit{
  opacity: 0.7;
  pointer-events: none;
}

/* ==========================================================================
   13. FAQ accordion
   ========================================================================== */

.faq-item{
  border-top: 1px solid var(--line);
  padding: 1.4em 0;
}
.faq-item:last-child{
  border-bottom: 1px solid var(--line);
}
.faq-item h4{
  margin-bottom: 0;
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 2rem;
}
.faq-item h4::after{
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--blue);
  transition: transform .2s ease;
}
.faq-item[aria-expanded="true"] h4::after,
.faq-item h4[aria-expanded="true"]::after{
  content: "−";
}

/* ==========================================================================
   14. Animations
   ========================================================================== */

@keyframes fadeInUp{
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.counter{
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--step-2);
  color: var(--navy);
  display: inline-block;
}

.hero-stats dt{
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.3em;
}
.hero-stats dd{
  margin: 0;
  font-family: var(--font-head);
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--navy);
}

/* ==========================================================================
   15. Accessibility
   ========================================================================== */

.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}