/*
Theme Name: Fieldgate Geomatics
Theme URI: https://www.fieldgategeomatics.com
Author: Fieldgate Geomatics Nig. Ltd
Description: Custom theme for Fieldgate Geomatics — geodetic, environmental sciences and survey services. Projects, team and equipment are editable custom post types.
Version: 1.0
Text Domain: fieldgate
*/
:root{
    --ink:#22261f;
    --parchment:#f4f0e4;
    --forest:#006633;
    --forest-deep:#052e19;
    --ochre:#cc9933;
    --ochre-soft:#e0bb6c;
    --teal:#173548;
    --rust:#c1512f;
    --line: rgba(34,38,31,0.15);
    --paper-card:#faf7ee;
    --radius:2px;
  }
  *{box-sizing:border-box;}
  html{scroll-behavior:smooth;}
  body{
    margin:0;
    background:var(--parchment);
    color:var(--ink);
    font-family:'Space Grotesk', sans-serif;
    -webkit-font-smoothing:antialiased;
  }
  h1,h2,h3{
    font-family:'Fraunces', serif;
    font-weight:600;
    margin:0;
    letter-spacing:-0.01em;
  }
  .mono{
    font-family:'JetBrains Mono', monospace;
  }
  a{color:inherit;}
  img{max-width:100%;display:block;}
  .wrap{
    max-width:1180px;
    margin:0 auto;
    padding:0 32px;
  }
  @media (max-width:640px){ .wrap{padding:0 20px;} }

  /* ---------- coordinate eyebrow ---------- */
  .coord{
    font-family:'JetBrains Mono', monospace;
    font-size:12px;
    letter-spacing:0.08em;
    text-transform:uppercase;
    color:var(--ochre);
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:14px;
  }
  .coord::before{
    content:"";
    width:7px;height:7px;
    border:1.5px solid var(--ochre);
    border-radius:50%;
    flex:none;
  }

  /* ---------- nav ---------- */
  header.site{
    position:sticky; top:0; z-index:50;
    background:rgba(244,240,228,0.92);
    backdrop-filter:blur(6px);
    border-bottom:1px solid var(--line);
  }
  .navbar{
    display:flex; align-items:center; justify-content:space-between;
    padding:18px 0;
  }
  .brand{
    display:flex; align-items:center; gap:12px;
    font-family:'Fraunces', serif;
    font-weight:600;
    font-size:19px;
    text-decoration:none;
  }
  .brand-mark{
    width:42px;height:42px;
    flex:none;
    object-fit:contain;
  }
  .hero-logo{
    width:64px;height:64px;
    object-fit:contain;
    margin-bottom:24px;
  }
  .footer-mark{
    width:26px;height:26px;
    object-fit:contain;
    vertical-align:middle;
    margin-right:8px;
    opacity:0.85;
  }
  .brand small{
    display:block;
    font-family:'JetBrains Mono', monospace;
    font-weight:400;
    font-size:9.5px;
    letter-spacing:0.12em;
    color:var(--forest);
    opacity:0.65;
    text-transform:uppercase;
  }
  nav.links{
    display:flex; gap:30px;
    font-size:14px;
  }
  nav.links a{
    text-decoration:none;
    color:var(--ink);
    position:relative;
    padding-bottom:3px;
  }
  nav.links a::after{
    content:"";
    position:absolute; left:0; bottom:0;
    width:0%; height:1px;
    background:var(--rust);
    transition:width .25s ease;
  }
  nav.links a:hover::after{width:100%;}
  nav.links a.current{color:var(--rust);}
  nav.links a.current::after{width:100%;}
  .nav-cta{
    background:var(--forest);
    color:var(--parchment) !important;
    padding:9px 18px;
    font-size:13px;
    border-radius:var(--radius);
    text-decoration:none;
  }
  .menu-btn{display:none;}
  @media (max-width:860px){
    nav.links{display:none;}
    .menu-btn{display:block;background:none;border:1px solid var(--line);padding:8px 12px;border-radius:2px;}
  }

  /* ---------- hero ---------- */
  .hero{
    position:relative;
    overflow:hidden;
    background:var(--forest-deep);
    color:var(--parchment);
  }
  .contour-svg{
    position:absolute; inset:0;
    width:100%; height:100%;
    opacity:0.5;
  }
  .hero-inner{
    position:relative; z-index:2;
    padding:120px 0 100px;
  }
  @media (max-width:640px){ .hero-inner{padding:80px 0 70px;} }
  .hero h1{
    font-size:clamp(38px,6vw,74px);
    line-height:1.02;
    max-width:920px;
    color:#f7f3e6;
  }
  .hero h1 em{
    font-style:italic;
    color:var(--ochre-soft);
  }
  .hero p.lede{
    max-width:560px;
    font-size:17px;
    line-height:1.6;
    color:rgba(247,243,230,0.72);
    margin-top:22px;
  }
  .hero-actions{
    margin-top:38px;
    display:flex; gap:16px; flex-wrap:wrap;
  }
  .btn{
    display:inline-flex; align-items:center; gap:8px;
    padding:13px 24px;
    font-size:14px;
    text-decoration:none;
    border-radius:var(--radius);
    font-weight:500;
    transition:transform .2s ease, background .2s ease;
  }
  .btn:hover{transform:translateY(-2px);}
  .btn-primary{background:var(--ochre); color:#1a1607;}
  .btn-primary:hover{background:var(--ochre-soft);}
  .btn-ghost{border:1px solid rgba(247,243,230,0.35); color:#f7f3e6;}
  .btn-ghost:hover{border-color:#f7f3e6;}

  .readout{
    margin-top:64px;
    display:flex; flex-wrap:wrap; gap:0;
    border-top:1px solid rgba(247,243,230,0.2);
    padding-top:22px;
  }
  .readout div{
    flex:1 1 150px;
    padding-right:24px;
  }
  .readout .val{
    font-family:'JetBrains Mono', monospace;
    font-size:15px;
    color:var(--ochre-soft);
  }
  .readout .lab{
    font-size:11px;
    letter-spacing:0.08em;
    text-transform:uppercase;
    color:rgba(247,243,230,0.55);
    margin-top:4px;
  }

  /* ---------- section shell ---------- */
  section{padding:96px 0;}
  @media (max-width:640px){ section{padding:64px 0;} }
  .section-head{
    max-width:640px;
    margin-bottom:52px;
  }
  .section-head h2{
    font-size:clamp(28px,4vw,42px);
    line-height:1.08;
  }
  .section-head p{
    margin-top:16px;
    font-size:15.5px;
    line-height:1.65;
    color:rgba(34,38,31,0.72);
  }
  .divider{
    border:none;
    border-top:1px solid var(--line);
    margin:0;
  }

  /* ---------- about ---------- */
  .about-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:64px;
    align-items:start;
  }
  @media (max-width:800px){ .about-grid{grid-template-columns:1fr; gap:40px;} }
  .about-grid p{
    font-size:16px;
    line-height:1.75;
    color:rgba(34,38,31,0.82);
  }
  .about-grid p + p{margin-top:16px;}
  .pillars{
    display:grid;
    gap:0;
    border-top:1px solid var(--line);
  }
  .pillar{
    display:grid;
    grid-template-columns:70px 1fr;
    gap:20px;
    padding:20px 0;
    border-bottom:1px solid var(--line);
  }
  .pillar .tag{
    font-family:'JetBrains Mono', monospace;
    font-size:11px;
    color:var(--rust);
    padding-top:3px;
  }
  .pillar h4{
    font-family:'Fraunces', serif;
    font-size:17px;
    font-weight:600;
    margin:0 0 4px;
  }
  .pillar p{
    font-size:14px;
    color:rgba(34,38,31,0.68);
    margin:0;
    line-height:1.55;
  }

  /* ---------- services ---------- */
  .services{
    background:var(--forest);
    color:var(--parchment);
  }
  .services .section-head p{color:rgba(247,243,230,0.68);}
  .services .section-head h2{color:#f7f3e6;}
  .svc-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:1px;
    background:rgba(247,243,230,0.14);
    border:1px solid rgba(247,243,230,0.14);
  }
  @media (max-width:900px){ .svc-grid{grid-template-columns:repeat(2,1fr);} }
  @media (max-width:600px){ .svc-grid{grid-template-columns:1fr;} }
  .svc{
    background:var(--forest);
    padding:34px 28px;
    min-height:210px;
    display:flex; flex-direction:column; justify-content:space-between;
    transition:background .25s ease;
  }
  .svc:hover{background:#233523;}
  .svc .num{
    font-family:'JetBrains Mono', monospace;
    font-size:12px;
    color:var(--ochre);
  }
  .svc h3{
    font-size:19px;
    margin-top:26px;
    color:#f7f3e6;
    line-height:1.2;
  }
  .svc p{
    margin-top:10px;
    font-size:13.5px;
    color:rgba(247,243,230,0.6);
    line-height:1.55;
  }

  /* ---------- team ---------- */
  .team-lead{
    display:grid;
    grid-template-columns:220px 1fr;
    gap:40px;
    padding-bottom:44px;
    margin-bottom:44px;
    border-bottom:1px solid var(--line);
  }
  @media (max-width:700px){ .team-lead{grid-template-columns:1fr;} }
  .team-lead .badge{
    font-family:'JetBrains Mono', monospace;
    font-size:11px;
    color:var(--rust);
    text-transform:uppercase;
    letter-spacing:0.08em;
  }
  .team-lead h3{font-size:26px; margin-top:10px;}
  .team-lead .role{
    font-size:13.5px;
    color:var(--forest);
    opacity:0.65;
    margin-top:4px;
  }
  .team-lead p{
    font-size:15px;
    line-height:1.7;
    color:rgba(34,38,31,0.78);
  }

  .team-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:1px;
    background:var(--line);
    border:1px solid var(--line);
  }
  @media (max-width:700px){ .team-grid{grid-template-columns:1fr;} }
  .team-card{
    background:var(--paper-card);
    padding:28px;
  }
  .team-card .role{
    font-family:'JetBrains Mono', monospace;
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:0.06em;
    color:var(--rust);
  }
  .team-card h4{
    font-family:'Fraunces', serif;
    font-size:19px;
    font-weight:600;
    margin:8px 0 10px;
  }
  .team-card p{
    font-size:13.5px;
    line-height:1.6;
    color:rgba(34,38,31,0.7);
    margin:0;
  }

  /* ---------- projects ---------- */
  .tabs{
    display:flex; flex-wrap:wrap; gap:8px;
    margin-bottom:32px;
  }
  .tab{
    font-family:'JetBrains Mono', monospace;
    font-size:12px;
    padding:9px 16px;
    border:1px solid var(--line);
    border-radius:20px;
    cursor:pointer;
    background:transparent;
    color:var(--ink);
  }
  .tab.active{
    background:var(--forest);
    border-color:var(--forest);
    color:var(--parchment);
  }
  table.proj{
    width:100%;
    border-collapse:collapse;
    font-size:14px;
  }
  table.proj thead th{
    text-align:left;
    font-family:'JetBrains Mono', monospace;
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:0.06em;
    color:rgba(34,38,31,0.55);
    padding:10px 14px;
    border-bottom:1px solid var(--ink);
  }
  table.proj tbody td{
    padding:16px 14px;
    border-bottom:1px solid var(--line);
    vertical-align:top;
  }
  table.proj tbody tr:hover td{background:rgba(198,154,61,0.08);}
  .proj-title{font-weight:500;}
  .proj-client{color:rgba(34,38,31,0.62); font-size:13px;}
  .proj-dur{font-family:'JetBrains Mono', monospace; font-size:12.5px; color:var(--rust); white-space:nowrap;}
  .proj-set{display:none;}
  .proj-set.active{display:table-row-group;}
  @media (max-width:700px){
    table.proj thead{display:none;}
    table.proj, table.proj tbody, table.proj tr, table.proj td{display:block; width:100%;}
    table.proj tbody tr{padding:14px 0; border-bottom:1px solid var(--line);}
    table.proj tbody td{border:none; padding:3px 0;}
  }

  /* ---------- gallery ---------- */
  .gal{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:14px;
  }
  @media (max-width:900px){ .gal{grid-template-columns:repeat(2,1fr);} }
  .gal figure{
    margin:0;
    aspect-ratio:4/5;
    background:linear-gradient(160deg,#2c3d2d,#1c2b1e);
    position:relative;
    overflow:hidden;
    border-radius:var(--radius);
  }
  .gal figure .grain{
    position:absolute; inset:0;
    background-image:
      repeating-linear-gradient(0deg, rgba(244,240,228,0.06) 0px, transparent 1px, transparent 26px, rgba(244,240,228,0.06) 27px),
      repeating-linear-gradient(90deg, rgba(244,240,228,0.06) 0px, transparent 1px, transparent 26px, rgba(244,240,228,0.06) 27px);
  }
  .gal figure figcaption{
    position:absolute; left:0; right:0; bottom:0;
    padding:12px 14px;
    font-family:'JetBrains Mono', monospace;
    font-size:11px;
    color:rgba(247,243,230,0.85);
    background:linear-gradient(to top, rgba(16,26,18,0.85), transparent);
  }
  .gal figure .tag-icon{
    position:absolute; top:14px; left:14px;
    width:26px; height:26px;
    border:1px solid rgba(247,243,230,0.4);
    border-radius:50%;
  }

  /* ---------- credentials strip ---------- */
  .creds{
    border-top:1px solid var(--line);
    border-bottom:1px solid var(--line);
    padding:26px 0;
  }
  .creds .wrap{
    display:flex; flex-wrap:wrap; gap:36px; align-items:center; justify-content:space-between;
  }
  .creds .item{
    font-family:'JetBrains Mono', monospace;
    font-size:12px;
    color:rgba(34,38,31,0.65);
    display:flex; gap:8px; align-items:baseline;
  }
  .creds .item b{color:var(--ink); font-size:13px;}

  /* ---------- CTA / contact ---------- */
  .cta{
    background:var(--teal);
    color:var(--parchment);
    position:relative;
    overflow:hidden;
  }
  .cta-grid{
    display:grid;
    grid-template-columns:1.1fr 0.9fr;
    gap:60px;
  }
  @media (max-width:800px){ .cta-grid{grid-template-columns:1fr; gap:36px;} }
  .cta h2{
    font-size:clamp(28px,4vw,44px);
    color:#f7f3e6;
    line-height:1.1;
  }
  .cta p.lede{
    margin-top:18px;
    font-size:15.5px;
    color:rgba(247,243,230,0.72);
    max-width:440px;
    line-height:1.65;
  }
  .contact-card{
    background:rgba(247,243,230,0.06);
    border:1px solid rgba(247,243,230,0.18);
    padding:32px;
    border-radius:var(--radius);
  }
  .contact-row{
    display:flex; justify-content:space-between; align-items:baseline;
    padding:14px 0;
    border-bottom:1px solid rgba(247,243,230,0.14);
    font-size:14px;
  }
  .contact-row:last-child{border-bottom:none;}
  .contact-row .k{color:rgba(247,243,230,0.55); font-size:11px; text-transform:uppercase; letter-spacing:0.06em; font-family:'JetBrains Mono', monospace;}
  .contact-row a{text-decoration:none; color:#f7f3e6;}
  .contact-row a:hover{color:var(--ochre-soft);}

  footer{
    background:var(--forest-deep);
    color:rgba(247,243,230,0.5);
    padding:36px 0;
    font-size:12.5px;
  }
  footer .wrap{
    display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px;
  }
  footer .mono{letter-spacing:0.04em;}

  @media (prefers-reduced-motion: reduce){
    *{animation-duration:0.01ms !important; animation-iteration-count:1 !important; transition-duration:0.01ms !important;}
  }

/* ---------- Editable images: hero, team, gallery ---------- */
.hero-grid{
  display:grid;
  grid-template-columns:1.15fr 0.85fr;
  gap:56px;
  align-items:center;
}
@media (max-width:900px){
  .hero-grid{grid-template-columns:1fr; gap:32px;}
  .hero-media{order:-1;}
}
.hero-media{
  position:relative;
  aspect-ratio:4/3.4;
}
.hero-media img{
  width:100%; height:100%;
  object-fit:cover;
  border-radius:2px;
  border:1px solid rgba(247,243,230,0.22);
  display:block;
}
.hero-placeholder{
  width:100%; height:100%;
  border:1px dashed rgba(247,243,230,0.32);
  background:rgba(247,243,230,0.04);
  display:flex; align-items:center; justify-content:center;
  text-align:center;
  padding:32px;
  border-radius:2px;
  box-sizing:border-box;
}
.hero-placeholder p{
  font-family:'JetBrains Mono', monospace;
  font-size:11.5px;
  line-height:1.7;
  color:rgba(247,243,230,0.5);
  margin:0;
}

.team-lead{grid-template-columns:180px 1fr;}
.team-lead-photo{
  width:150px; height:150px;
  border-radius:2px;
  object-fit:cover;
  margin-bottom:16px;
  border:1px solid var(--line);
}
.team-lead-photo-placeholder{
  width:150px; height:150px;
  border-radius:2px;
  border:1px dashed var(--line);
  background:var(--paper-card);
  display:flex; align-items:center; justify-content:center;
  margin-bottom:16px;
}
.team-lead-photo-placeholder span{
  font-family:'JetBrains Mono', monospace;
  font-size:10px;
  color:rgba(34,38,31,0.4);
  text-align:center;
  padding:0 10px;
}

.team-card-photo{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  margin-bottom:16px;
  border-radius:2px;
  display:block;
}
.team-card-photo-placeholder{
  width:100%;
  aspect-ratio:1/1;
  border:1px dashed var(--line);
  background:rgba(34,38,31,0.03);
  display:flex; align-items:center; justify-content:center;
  margin-bottom:16px;
  border-radius:2px;
}
.team-card-photo-placeholder span{
  font-family:'JetBrains Mono', monospace;
  font-size:10px;
  color:rgba(34,38,31,0.35);
  text-align:center;
  padding:0 10px;
}

.gal figure img{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
}
.gal figure .grain{ z-index:1; }
.gal figure img{ z-index:0; }
.gal figure figcaption{ z-index:2; }
.gal figure .tag-icon{ z-index:2; }
.gal-empty-hint{
  font-size:13px;
  color:rgba(34,38,31,0.5);
  margin-top:-30px;
  margin-bottom:36px;
}
