/*
Theme Name: ExonGate
Theme URI: https://exongate.com
Author: ExonGate
Author URI: https://exongate.com
Description: Single-page theme for ExonGate — a technology company based in Sri Lanka. Built for a hero introduction, capabilities, an optional project showcase, client logos, and a phone-first contact section.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: exongate
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  /* Color: dark navy ground with the logo's teal gradient as the single accent */
  --bg: #070b11;
  --bg-panel: #0c141d;
  --bg-panel-raised: #101b26;
  --line: #1b2a35;
  --line-bright: #24404a;
  --teal-deep: #0f3d46;
  --teal: #1c8f96;
  --teal-bright: #3fe0d1;
  --text: #eaf3f2;
  --text-muted: #8fa5ac;
  --text-faint: #5c7178;

  --font-head: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;

  --wrap: 1120px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 3px;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; color: var(--text-muted); }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

@media (max-width: 480px) {
  :root { --gutter: 1.5rem; }
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--teal-bright);
  color: #06201f;
  padding: 0.75rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: var(--gutter); }

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

/* ==========================================================================
   Section scaffolding — a thin rule + small tick echoes the layered
   horizontal strokes in the mark, used instead of a generic label
   ========================================================================== */
.section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
  border-top: 1px solid var(--line);
}
.section-head {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-bottom: 2.5rem;
}
.section-head .tick {
  width: 22px;
  height: 2px;
  background: var(--teal-bright);
  flex: none;
  transform: translateY(-0.35em);
}
.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}
.section-note {
  color: var(--text-faint);
  font-size: 0.95rem;
  margin-left: auto;
  align-self: center;
}

/* ==========================================================================
   Motion — one entrance on load, one reveal treatment on scroll
   ========================================================================== */
@keyframes exongate-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-copy > * ,
.hero-mark {
  opacity: 0;
  animation: exongate-rise 0.7s ease forwards;
}
.hero-lines      { animation-delay: 0.05s; }
.hero h1         { animation-delay: 0.15s; }
.hero .lede      { animation-delay: 0.28s; }
.hero-actions    { animation-delay: 0.4s; }
.hero-mark       { animation-delay: 0.3s; }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .hero-mark { animation: none; opacity: 1; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 11, 17, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand img,
.brand .custom-logo {
  height: 34px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}
.brand .brand-text {
  font-family: var(--font-head);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.primary-nav ul {
  display: flex;
  gap: 2rem;
}
.primary-nav a {
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--text);
  border-color: var(--teal);
}
.primary-nav .cta-link {
  color: var(--teal-bright);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-bright);
  color: var(--text);
  width: 42px;
  height: 38px;
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span { top: 18px; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .primary-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .primary-nav.is-open { max-height: 400px; }
  .primary-nav ul { flex-direction: column; gap: 0; padding: 0.5rem var(--gutter) 1.5rem; }
  .primary-nav a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: clamp(3rem, 9vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1.4rem;
}
.hero-lines span {
  height: 2px;
  background: linear-gradient(90deg, var(--teal-bright), transparent);
}
.hero-lines span:nth-child(1) { width: 64px; }
.hero-lines span:nth-child(2) { width: 40px; }
.hero-lines span:nth-child(3) { width: 20px; }

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.12;
  max-width: 16ch;
}
.hero .lede {
  margin-top: 1.25rem;
  font-size: 1.1rem;
  max-width: 46ch;
  color: var(--text-muted);
}
.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  border: 1px solid var(--line-bright);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--teal-bright);
  color: #05201e;
  border-color: var(--teal-bright);
  font-weight: 600;
}
.btn-primary:hover { background: #56e9db; }
.btn-secondary { color: var(--text); }
.btn-secondary:hover { border-color: var(--teal); color: var(--teal-bright); }

.hero-mark {
  justify-self: center;
  width: min(100%, 320px);
  aspect-ratio: 1;
}
.hero-mark svg { width: 100%; height: 100%; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-mark { width: min(60%, 220px); order: -1; }
}

/* ==========================================================================
   Stats band
   ========================================================================== */
.stats-band {
  border-top: 1px solid var(--line);
  background: var(--bg-panel);
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  padding: 2.25rem 0;
}
.stat { text-align: left; }
.stat-value {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--teal-bright);
}
.stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ==========================================================================
   Tech stack chips (inside About)
   ========================================================================== */
.techstack {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.techstack-label {
  font-family: var(--font-head);
  font-size: 0.9rem;
  color: var(--text-faint);
  flex: none;
}
.techstack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.techstack-list li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.techstack-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex: none;
}

/* ==========================================================================
   How we work — a real sequence, so numbering is justified here
   ========================================================================== */
.process-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  counter-reset: none;
}
.process-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.process-step:first-child { padding-top: 0; }
.process-step:last-child { border-bottom: none; }
.process-number {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--teal);
}
.process-step h3 { font-size: 1.05rem; margin-bottom: 0.4rem; color: var(--text); }
.process-step p { margin: 0; }

/* ==========================================================================
   FAQ — native details/summary, no JS required
   ========================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 72ch;
}
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  background: var(--bg-panel);
}
.faq-item summary {
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ""; }
.faq-item summary::after {
  content: "+";
  color: var(--teal-bright);
  font-size: 1.3rem;
  flex: none;
  margin-left: 1rem;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin: 0.9rem 0 0; }

/* ==========================================================================
   WhatsApp floating button
   ========================================================================== */
.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--teal-bright);
  color: #05201e;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  z-index: 90;
  transition: transform 0.15s ease;
}
.whatsapp-float:hover { transform: scale(1.06); }

/* ==========================================================================
   About / capabilities — left accent bar list, not a card grid
   ========================================================================== */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}
.capability {
  padding: 1.75rem 1.5rem 1.75rem 1.35rem;
  border-left: 2px solid var(--line-bright);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease;
}
.capability:hover { border-left-color: var(--teal-bright); transform: translateX(2px); }
.capability h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.capability p { margin: 0; font-size: 0.95rem; }

.about-copy {
  max-width: 62ch;
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}
.about-copy p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Projects — hideable via Customizer toggle
   ========================================================================== */
.projects-section { display: none; }
.projects-section.is-visible { display: block; }
.projects-empty {
  border: 1px dashed var(--line-bright);
  padding: 2rem;
  color: var(--text-faint);
  font-size: 0.95rem;
  border-radius: var(--radius);
}
#exongate-projects-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
#exongate-projects-widgets .widget {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  padding: 1.5rem;
  border-radius: var(--radius);
}
#exongate-projects-widgets .widget-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.6rem;
}
#exongate-projects-widgets img { border-radius: var(--radius); margin-bottom: 0.75rem; }

/* ==========================================================================
   Clients — hexagon-frame logo grid (echoes the mark, not rounded cards)
   ========================================================================== */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.25rem;
}
.clients-grid .widget {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 1.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.clients-grid .widget:hover { border-color: var(--teal); transform: translateY(-2px); }
.clients-grid img {
  width: auto;
  height: 40px;
  max-width: 140px;
  padding: 0.5rem 0.9rem;
  background: #f4f6f6;
  border-radius: 4px;
  object-fit: contain;
}
.clients-empty {
  border: 1px dashed var(--line-bright);
  padding: 2rem;
  color: var(--text-faint);
  font-size: 0.95rem;
  border-radius: var(--radius);
}

/* ==========================================================================
   Contact — phone first, no address
   ========================================================================== */
.contact-section .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); }
.contact-list { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 1.5rem; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contact-item .icon {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: var(--radius);
  background: var(--teal-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-bright);
}
.contact-item .label {
  font-size: 0.8rem;
  text-transform: none;
  color: var(--text-faint);
  margin-bottom: 0.15rem;
}
.contact-item a,
.contact-item span.value {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--text);
}
.contact-item a:hover { color: var(--teal-bright); }

.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-bottom: 0.4rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--line-bright);
  color: var(--text);
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.98rem;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--teal-bright);
  outline: none;
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.85rem; margin-top: 0.5rem; }
.form-note.success { color: var(--teal-bright); }
.form-note.error { color: #e2735a; }

@media (max-width: 780px) {
  .contact-section .wrap { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer .brand img { height: 40px; opacity: 0.85; }
.site-footer small { color: var(--text-faint); font-size: 0.85rem; }
