/* =========================================================
   Steve Gibbs — homepage
   Design tokens (edit these to reskin the whole site)
   ========================================================= */
:root{
  /* color */
  --ink:        #1B2430;   /* deep slate navy — dark sections, headings */
  --ink-soft:   #2B3648;
  --paper:      #F7F7F4;   /* off-white background */
  --paper-dim:  #EFEEE8;   /* slightly deeper panel background */
  --slate:      #5B6577;   /* secondary text */
  --line:       #DDE0DD;   /* hairline borders on light bg */
  --line-dark:  #364258;   /* hairline borders on dark bg */
  --pine:       #2F6F5E;   /* primary accent — signal / links / CTA */
  --pine-dark:  #24564A;
  --rust:       #C4622D;   /* secondary accent — used sparingly */
  --rust-dark:  #A34E1F;   /* rust hover / pressed state */
  --white:      #FFFFFF;

  /* type */
  --font-display: "Anton", "Impact", sans-serif;
  --font-antonio: "Antonio", "Anton", "Impact", sans-serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", "SFMono-Regular", Menlo, monospace;

  /* layout */
  --wrap: 1160px;
  --radius: 10px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; min-height: 100vh; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body{
  margin:0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
main{ flex: 1 0 auto; display:flex; flex-direction:column; }

h1,h2,h3{
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h2{ font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3{ font-size: 1.2rem; margin-bottom: .35em; }

p{ margin: 0 0 1em; color: var(--slate); }
a{ color: inherit; }

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

.eyebrow{
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .02em;
  color: var(--pine);
  margin-bottom: .9em;
}
.section-alt .eyebrow{ color: var(--rust); }

.section-lede{
  max-width: 620px;
  font-size: 1.05rem;
}

/* -------- buttons -------- */
.btn{
  display:inline-flex;
  align-items:center;
  gap:.4em;
  font-family: var(--font-antonio);
  font-weight: 600;
  font-size: .96rem;
  text-decoration:none;
  padding: .3em .7em;
  border-radius: 8px;
  border: 1.5px solid transparent;
  transition: transform .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
  white-space: nowrap;
}
.btn:hover{ transform: translateY(-1px); }
.btn-solid{ background: var(--pine); color: var(--white); }
.btn-solid:hover{ background: var(--pine-dark); }
.btn-rust{ background: var(--rust); color: var(--white); }
.btn-rust:hover{ background: var(--rust-dark); }
.btn-ghost{ border-color: currentColor; color: inherit; }
.btn-ghost:hover{ background: rgba(0,0,0,.05); }
.hero .btn-ghost{ border-color: rgba(247,247,244,.5); }
.hero .btn-ghost:hover{ background: rgba(247,247,244,.1); }
.btn-lg{ padding: .85em 1.6em; font-size: 1.04rem; }

.page-pills{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.page-pills a{
  font-family: var(--font-body);
  font-weight:600;
  font-size:.88rem;
  color: var(--ink-soft);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: .55em 1.1em;
  text-decoration:none;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.page-pills a:hover{ border-color: var(--pine); color: var(--pine); }
.page-pills a.is-active{ background: var(--pine); border-color: var(--pine); color: var(--white); }

.text-link{
  display:inline-block;
  font-weight:600;
  color: var(--pine);
  text-decoration:none;
  border-bottom: 1.5px solid transparent;
  transition: border-color .18s var(--ease);
}
.text-link:hover{ border-color: var(--pine); }


.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  
  background: rgba(247,247,244,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s var(--ease);
}
.site-header.is-scrolled{ box-shadow: 0 8px 24px -18px rgba(27,36,48,.35); }
.site-header.is-scrolled .brand-mark{
  animation: brand-tilt 1.8s var(--ease) both;
}
.site-header.is-scrolled .brand-word{
  background: linear-gradient(120deg, var(--ink) 0%, var(--pine) 35%, var(--rust) 60%, var(--ink) 90%);
  background-size: 240% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: brand-glint 3.4s linear infinite;
}




@keyframes brand-tilt{
  0%   { transform: rotate(0deg); }
  60%  { transform: rotate(-33deg); }
  100% { transform: rotate(-30deg); }
}
@keyframes brand-glint{
  0%   { background-position: 0% 50%; }
  100% { background-position: 240% 50%; }
}
.header-inner{
  display:flex;
  align-items:center;
  gap: 28px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand{
  display:flex;
  align-items:center;
  gap:.6em;
  text-decoration:none;
  color: var(--ink);
  margin-right: auto;

}
.brand-mark{
  display:flex;
  align-items:center;
  justify-content:center;
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: .85rem;
  flex: none;
}
.brand-word{
  display:flex;
  flex-direction:column;

  font-weight: bold;
  font-size: 2rem;
  line-height:1.1;
  margin-left:12px;
  width:220px;
}
.brand-word em{
  font-style: normal;
  font-size: 1rem;
  color: var(--slate);

}
.brand-word h2 {margin-bottom:2px;font-weight: 100;}

.main-nav{ display:flex; gap: 26px; }
.main-nav a{
  text-decoration:none;
  font-size: .93rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: .2em 0;
}
.main-nav a::after{
  content:"";
  position:absolute; left:0; right:0; bottom:-2px;
  height: 2px; background: var(--pine);
  transform: scaleX(0); transform-origin: left;
  transition: transform .2s var(--ease);
}
.main-nav a:hover::after{ transform: scaleX(1); }

.header-actions{ display:flex; align-items:center; gap: 12px; }

.nav-toggle{
  display:none;
  flex-direction:column;
  justify-content:center;
  gap:5px;
  width: 40px; height: 40px;
  border:1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor:pointer;
}
.nav-toggle span{ height:2px; background: var(--ink); border-radius:2px; transition: transform .2s var(--ease), opacity .2s var(--ease); }
.nav-toggle span:nth-child(1){ margin-left:8px; margin-right:8px; }
.nav-toggle span:nth-child(2){ margin-left:8px; margin-right:8px; }
.nav-toggle span:nth-child(3){ margin-left:8px; margin-right:14px; }

.mobile-nav{
  display:none;
  flex-direction:column;
  gap: 2px;
  padding: 6px 24px 20px;
  border-top: 1px solid var(--line);
}
.mobile-nav a{
  padding: 12px 4px;
  text-decoration:none;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-weight:500;
}
.mobile-nav .btn{ margin-top: 12px; justify-content:center; }

body.nav-open .mobile-nav{ display:flex; }
body.nav-open .nav-toggle span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2){ opacity:0; }
body.nav-open .nav-toggle span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */
.hero{
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100vh - 67px);
  min-height: calc(100svh - 67px);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  padding: 96px 0 80px;
}
.hero-terrain{
  position:absolute; inset:auto 0 0 0; height: 46%;
  background:
    linear-gradient(180deg, rgba(27,36,48,0) 0%, var(--ink) 92%),
    linear-gradient(115deg, var(--pine-dark) 0%, transparent 45%);
  clip-path: polygon(0% 60%, 8% 40%, 18% 55%, 30% 22%, 42% 48%, 54% 18%, 68% 44%, 80% 26%, 92% 46%, 100% 34%, 100% 100%, 0% 100%);
  opacity: .55;
}
.hero-inner{ position:relative; max-width: 760px; }
.hero .eyebrow{ color: #8FD9C4; }
.hero-title{
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  color: var(--white);
}
.hero-title .accent{ color: #8FD9C4; }
.hero-sub{
  font-size: 1.1rem;
  color: #C7CDD6;
  max-width: 560px;
}
.page-hero{
  position: relative;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  padding: 72px 0 56px;
}
.page-hero .hero-title{ margin-bottom: .2em; }
.status-line{
  display:flex; flex-wrap:wrap; align-items:center; gap:.5em;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: #9AA5B5;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: .6em 1.1em;
  width: fit-content;
  margin: 1.6em 0;
}
.status-line .dot{
  width:8px; height:8px; border-radius:50%;
  background: #4FE3B7;
  box-shadow: 0 0 0 3px rgba(79,227,183,.18);
}
.status-line .sep{ opacity:.5; }
.hero-cta{ display:flex; gap: 14px; flex-wrap:wrap; margin-top: 1.4em; }

/* =========================================================
   Sections (shared)
   ========================================================= */
.section{ padding: 88px 0; }
.section-alt{ background: var(--paper-dim); }

/* -------- about -------- */
.about-grid{
  display:grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 56px;
  align-items:start;
}
.about-copy p{ max-width: 56ch; }

.spec-sheet{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow:hidden;
}
.spec-title{
  margin:0;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--slate);
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-dim);
}
.spec-sheet dl{ margin:0; padding: 6px 0; }
.spec-row{
  display:flex; justify-content:space-between; gap: 12px;
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: .85rem;
  border-bottom: 1px dashed var(--line);
}
.spec-row:last-child{ border-bottom:none; }
.spec-row dt{ color: var(--slate); }
.spec-row dd{ margin:0; text-align:right; font-weight:500; }

.services-photo{
  display:block;
  width:100%;
  height:auto;
  border-radius:8px;
  border:1px solid var(--line);
}

.estimate-frame{
  width: 100%;
  margin-top: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.estimate-frame iframe{
  display: block;
  width: 100%;
  height: clamp(540px, 78vh, 900px);
  border: 0;
}
.card-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 40px;
}
.card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.section-alt .card{ background: var(--white); }
.card:hover{ transform: translateY(-4px); box-shadow: 0 14px 30px -18px rgba(27,36,48,.25); }
.card-icon{
  width: 42px; height:42px;
  display:flex; align-items:center; justify-content:center;
  border-radius: 8px;
  background: var(--paper-dim);
  color: var(--pine);
  margin-bottom: 16px;
}
.card-icon svg{ width: 22px; height:22px; }
.card-tag{
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--rust);
  margin: 0 0 .4em;
}
.card p{ font-size: .92rem; margin-bottom:0; }

.card-link{ display:block; color: inherit; text-decoration:none; }
.card-link:hover .card-scan img{ transform: scale(1.03); }
.card-scan{
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom: 18px;
  padding: 14px;
  background: var(--paper-dim);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.card-scan img{
  display:block;
  width: 100%;
  max-width: 180px;
  height: auto;
  transition: transform .18s var(--ease);
}

/* -------- stats -------- */
.stats{ background: var(--ink); color: var(--paper); padding: 56px 0; }
.stats-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align:center;
}
.stat{ display:flex; flex-direction:column; gap:.3em; }
.stat-num{
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight:400;
  color: #8FD9C4;
}
.stat-label{
  font-family: var(--font-mono);
  font-size: .78rem;
  color: #9AA5B5;
}

/* -------- work -------- */
#work{
  position: relative;
  z-index: 2;
  box-shadow: 0 10px 16px -10px rgba(27,36,48,.28);
}
.work-inner{
  display:grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items:center;
}
.quote{
  margin:0;
  padding: 28px 26px;
  background: var(--white);
  border-left: 3px solid var(--rust);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.quote p{ font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); margin-bottom:.5em; }
.quote cite{ font-family: var(--font-mono); font-size: .78rem; color: var(--slate); font-style:normal; }

/* -------- dropdown -------- */
.dropdown{
  margin-top: 28px;
  width: 100%;
}
.dropdown-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  width:100%;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight:600;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor:pointer;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.dropdown-toggle:hover{ border-color: var(--pine); }
.dropdown-toggle:focus-visible{ outline: 2px solid var(--pine); outline-offset: 2px; }
.dropdown-toggle .chev{
  flex: none;
  width: 18px; height: 18px;
  color: var(--pine);
  transition: transform .2s var(--ease);
}
.dropdown.is-open .chev{ transform: rotate(180deg); }
.dropdown-menu{
  margin-top: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.dropdown-menu a{
  display:block;
  padding: 12px 18px;
  color: var(--ink);
  font-weight:500;
  text-decoration:none;
  border-bottom: 1px solid var(--line);
}
.dropdown-menu a:last-child{ border-bottom:none; }
.dropdown-menu a:hover{ background: var(--paper-dim); color: var(--pine); }
.dropdown-menu a:focus-visible{ outline: 2px solid var(--pine); outline-offset: -2px; }
.dropdown-menu[hidden]{ display:none; }
.dropdown.is-open .dropdown-menu{ animation: dropdown-in .18s var(--ease); }
@keyframes dropdown-in{
  from{ opacity:0; transform: translateY(-4px); }
  to{ opacity:1; transform:none; }
}

/* -------- contact -------- */
#contact{
  /* subtle fixed background — image faded to ~6% under a paper overlay */
  background-image:
    linear-gradient(rgba(247,247,244,.94), rgba(247,247,244,.94)),
    url('../assets/img/users.jpg');
  background-size: auto, cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.contact-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items:start;
}
.contact-list{ list-style:none; margin: 1.4em 0 0; padding:0; }
.contact-list li{
  display:flex; justify-content:space-between; gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
.contact-list li span{ font-family: var(--font-mono); font-size: .78rem; color: var(--slate); }
.contact-list a{ color: var(--pine); font-weight:600; text-decoration:none; }

.contact-gate{ margin: 1.6em 0 0; }
.contact-gate-card{
  display:flex; flex-direction:column; align-items:flex-start; gap: 14px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.contact-gate-copy{ margin: 0; max-width: 38ch; font-size: .92rem; color: var(--slate); }
.btn-hold{
  position: relative;
  justify-content:center;
  overflow: hidden;
  cursor: pointer;
}
.btn-hold .hold-ring{
  width: 18px; height: 18px;
  flex: none;
  transform: rotate(-90deg);
}
.hold-ring .ring-track{ fill:none; stroke: rgba(255,255,255,.35); stroke-width: 4; }
.hold-ring .ring-fill{
  fill:none; stroke: var(--paper); stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 163.36;
  stroke-dashoffset: 163.36;
}
.btn-hold:focus-visible{ outline: 2px solid var(--rust); outline-offset: 3px; }
.contact-gate.is-holding .btn-hold{ background: var(--pine-dark); }
.contact-gate.is-resolved .contact-gate-card{ display:none; }
.gate-error{
  margin: 0;
  padding: .6em .9em;
  border: 1px solid #F0C8B6;
  border-radius: 8px;
  background: #FBEAE4;
  color: #A03E11;
  font-size: .85rem;
  line-height: 1.45;
}
.contact-reveal{ margin-top: .4em; }

.contact-form{
  display:flex; flex-direction:column; gap: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.contact-form label{
  display:flex; flex-direction:column; gap: 6px;
  font-size: .85rem; font-weight:600; color: var(--ink-soft);
}
.contact-form input,
.contact-form textarea{
  font-family: var(--font-body);
  font-size: .95rem;
  padding: .7em .8em;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus{
  outline: 2px solid var(--pine);
  outline-offset: 1px;
}
.contact-form .btn{ align-self:flex-start; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer{ background: var(--ink); color: #B9C0CC; padding-top: 60px; }
.footer-inner{
  display:grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line-dark);
}
.footer-col{ display:flex; flex-direction:column; gap: 10px; }
.footer-col .brand{ color: var(--white); margin-right:0; }
.footer-col .brand-mark{ background: var(--paper); color: var(--ink);font-size:2em }
.footer-col .brand-word{ font-family: var(--font-display); font-weight: 400; }
.footer-col .brand-mark-who{ background: var(--paper); color: var(--ink);font-size:1.25em;padding: .3em .6em;border-radius:5px; font-family: var(--font-antonio); font-weight: 700; }


.footer-tag{ font-size: .85rem; color: #8B94A5; max-width: 32ch; }
.idaho-mark{ opacity: .85; margin-top: 4px; }
.footer-heading{
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6E7889;
  margin: 0 0 4px;
}
.footer-col a{
  color: #C7CDD6;
  text-decoration:none;
  font-size: .9rem;
}
.footer-col a:hover{ color: var(--white); }
.footer-bottom{
  display:flex; justify-content:space-between;
  padding: 18px 24px 28px;
  font-size: .8rem;
  color: #6E7889;
}


.footer-waves{
  display: block;
  width: 100%;
  height: clamp(44px, 7vw, 100px);
  max-height: 100px;
  margin: 0;
}

.footer-waves .parallax1 > use{ animation: sgwf-move-1 26s linear infinite; animation-delay: -4s; }
.footer-waves .parallax2 > use{ animation: sgwf-move-2 20s linear infinite; animation-delay: -9s; }
.footer-waves .parallax3 > use{ animation: sgwf-move-3 15s linear infinite; animation-delay: -2s; }
.footer-waves .parallax4 > use{ animation: sgwf-move-4 11s linear infinite; animation-delay: -6s; }

@keyframes sgwf-move-1{ 0%{ transform: translate(88px, 0); } 100%{ transform: translate(-88px, 0); } }
@keyframes sgwf-move-2{ 0%{ transform: translate(-88px, 0); } 100%{ transform: translate(88px, 0); } }
@keyframes sgwf-move-3{ 0%{ transform: translate(88px, 0); } 100%{ transform: translate(-88px, 0); } }
@keyframes sgwf-move-4{ 0%{ transform: translate(-88px, 0); } 100%{ transform: translate(88px, 0); } }


/* -------- sitemap -------- */
.sitemap-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 40px;
}
.sitemap-card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.sitemap-card:hover{ transform: translateY(-4px); box-shadow: 0 14px 30px -18px rgba(27,36,48,.25); }
.section-alt .sitemap-card{ background: var(--white); }
.sitemap-head{
  display:flex;
  align-items:center;
  gap: 10px;
  margin:0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--slate);
  text-transform: lowercase;
}
.sitemap-head svg{ width: 18px; height: 18px; color: var(--pine); flex: none; }
.sitemap-list{ list-style:none; margin: 0; padding: 6px 0; }
.sitemap-list li{ padding: 0; }
.sitemap-list li:last-child a{ border-bottom:none; }
.sitemap-list a{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap: 12px;
  padding: 11px 18px;
  text-decoration:none;
  color: var(--ink-soft);
  font-size: .93rem;
  font-weight:500;
  border-bottom: 1px dashed var(--line);
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.sitemap-list a:hover{ background: var(--paper-dim); color: var(--pine); }
.sitemap-list a span{
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 400;
  color: var(--slate);
  white-space: nowrap;
}
.sitemap-list a:hover span{ color: var(--pine); }

/* -------- login -------- */
.login-page{
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-image:
    linear-gradient(rgba(247,247,244,.95), rgba(247,247,244,.95)),
    url('../assets/img/login.jpg');
  background-size: auto, cover;
  background-position: center;
  background-repeat: no-repeat;
}
.client-login .login-card{
  max-width: none;
  width: 100%;
  padding: 8px;
  background: none;
  border: none;
}

.login-card{
  max-width: none;
  width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}



.login-captcha{
  overflow: hidden;
  max-width: 100%;
}
.login-captcha .g-recaptcha{
  transform-origin: left top;
}
@media (max-width: 560px){
  .login-captcha .g-recaptcha{ transform: scale(.86); }
}
@media (max-width: 380px){
  .login-captcha .g-recaptcha{ transform: scale(.74); }
}
.login-error{
  background: #FBEAE4;
  color: #A03E11;
  border: 1px solid #F0C8B6;
  border-radius: 8px;
  padding: .6em .9em;
  font-size: .9rem;
}
.login-hint{ margin: 1.2em 0 0; font-size: .9rem; }

/* -------- portfolio -------- */
.mono-note{ font-family: var(--font-mono); font-size: .72rem; color: var(--slate); }
.legend{ list-style:none; margin: 1.6em 0 1em; padding: 0; display:grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; max-width: 720px; }
.legend li{ display:flex; align-items:center; gap: 10px; font-size: .92rem; color: var(--slate); }
.legend strong{ color: var(--ink); margin-right: .4em; }
.badge-dot{ width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot-contracted{ background: #EAB308; }
.dot-subcontracted{ background: #22A7E0; }
.dot-fullbuild{ background: #2F6F5E; }
.dot-inherited{ background: #C4622D; }

.portfolio-filters{ display:flex; flex-wrap:wrap; gap: 10px; margin: 1.8em 0 0; }
.filter-btn{
  font-family: var(--font-body);
  font-weight:600;
  font-size:.88rem;
  color: var(--ink-soft);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: .55em 1.1em;
  cursor:pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.filter-btn:hover{ border-color: var(--pine); color: var(--pine); }
.filter-btn.is-active{ background: var(--pine); border-color: var(--pine); color: var(--white); }

.project-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 36px;
}
.project-card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.project-card:hover{ transform: translateY(-4px); box-shadow: 0 14px 30px -18px rgba(27,36,48,.25); }
.project-card a{ display:block; text-decoration:none; color: var(--ink); }
.project-card img{
  width:100%;
  height: 120px;
  object-fit: contain;
  padding: 22px 18px;
  background: var(--paper-dim);
}
.project-meta{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: .9rem;
  font-weight:600;
}
.project-meta b{
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight:500;
  color: var(--slate);
  text-transform: lowercase;
}
.project-card[class*="contracted"] .project-meta b{ color: var(--rust); }
.portfolio-note{ margin-top: 2.4em; }

/* -------- contact form messages / notes -------- */
.form-message{ display:none; padding: .8em 1em; border-radius: 8px; margin-bottom: 1.2em; font-size: .92rem; font-weight:500; }
.form-message.success{ display:block; background:#E8F3EE; color:#24564A; border:1px solid #C6E0D4; }
.form-message.error{ display:block; background:#FBEAE4; color:#A03E11; border:1px solid #F0C8B6; }
.field-note{ font-style: normal; font-size: .78rem; color: var(--slate); }
.client-list-note{
  margin-top: 2.2em;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--pine);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.client-list-note p{ font-size: .92rem; margin-bottom: 0; }




/* -------- QR tool -------- */
.qr-dashboard{
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.qr-form label{ display:block; font-size: .85rem; font-weight:600; color: var(--ink-soft); margin: 14px 0 6px; }
.qr-form input[type="url"],
.qr-form input[type="text"],
.qr-form select{
  width:100%;
  font-family: var(--font-body);
  font-size: .95rem;
  padding: .7em .8em;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  margin: 0;
}
.qr-form input:focus, .qr-form select:focus{ outline: 2px solid var(--pine); outline-offset: 1px; }
.qr-actions{ display:flex; flex-wrap:wrap; gap: 12px; margin-top: 22px; }
.qr-dividers{
  display:flex; flex-wrap:wrap; align-items:center; gap: 12px;
  border-top: 1px dashed var(--line);
  margin-top: 22px; padding-top: 18px;
}
.hr{ flex:1 1 100%; }
.qr-grid{ display:flex; flex-wrap:wrap; gap: 14px; margin-top: 22px; }
.qr-tile{
  position:relative;
  background: var(--paper-dim);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  text-align:center;
  cursor:pointer;
}
.qr-tile.highlight{ outline: 2px solid var(--pine); }
.delete-btn{
  position:absolute;
  top: 6px; right: 6px;
  width: 22px; height: 22px;
  line-height: 1;
  border-radius: 50%;
  border: none;
  background: var(--slate);
  color: var(--white);
  font-size: 14px;
  cursor:pointer;
}
.delete-btn:hover{ background: var(--rust); }
.qr-label{ font-family: var(--font-mono); font-size: .72rem; color: var(--ink-soft); margin-top: 8px; }
.qr-url{ font-size: .66rem; word-break: break-all; color: var(--slate); max-width: 160px; }

.qr-download{
  margin: 28px auto 0;
  max-width: 720px;
  text-align: center;
  padding: 20px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.qr-download p{
  margin: 0 0 .8em;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink);
}

.qr-how{
  margin: 28px auto 0;
  max-width: 720px;
  color: var(--slate);
  font-size: .95rem;
}
.qr-how p{ margin: 0; max-width: 60ch; }
.qr-how strong{ color: var(--ink); }

/* -------- legal (fine print) -------- */
.legal-grid{
  display:grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
}
.legal-toc{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  position: sticky;
  top: 96px;
}
.legal-toc ol{ margin: 0; padding: 10px 0; list-style-position: inside; counter-reset: toc; }
.legal-toc li{
  padding: 0;
  counter-increment: toc;
  border-bottom: 1px dashed var(--line);
}
.legal-toc li:last-child{ border-bottom: none; }
.legal-toc li::marker{ font-family: var(--font-mono); font-size: .74rem; color: var(--pine); }
.legal-toc a{
  display: inline-block;
  padding: 10px 16px 10px 4px;
  text-decoration: none;
  font-size: .9rem;
  color: var(--ink-soft);
  transition: color .15s var(--ease);
}
.legal-toc a:hover{ color: var(--pine); }
.legal-body h2{
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  margin-top: 2.4em;
  padding-top: 1.2em;
  border-top: 1px solid var(--line);
  scroll-margin-top: 96px;
}
.legal-body h2:first-child{ margin-top: 0; padding-top: 0; border-top: none; }
.legal-body p{ max-width: 68ch; }
.legal-body ul{ color: var(--slate); }

/* =========================================================
   Scroll reveal
   ========================================================= */
.js .reveal{
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.js .reveal.in-view{ opacity:1; transform:none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px){
  .main-nav, .header-actions{ display:none; }
  .nav-toggle{ display:flex; }
  .about-grid, .work-inner, .contact-grid{ grid-template-columns: 1fr; }
  .card-grid{ grid-template-columns: repeat(2, 1fr); }
  .sitemap-grid{ grid-template-columns: 1fr; }
  .project-grid{ grid-template-columns: repeat(2, 1fr); }
  .legend{ grid-template-columns: 1fr; }
  .legal-grid{ grid-template-columns: 1fr; }
  .legal-toc{ position: static; }
  .stats-grid{ grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .footer-inner{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px){
  .card-grid{ grid-template-columns: 1fr; }
  .project-grid{ grid-template-columns: 1fr; }
  .footer-inner{ grid-template-columns: 1fr; }
  .hero{ padding: 76px 0 64px; }
  .section{ padding: 64px 0; }
}
