/* components.css — all UI components + responsive rules (fluid-first) */

/* ── SCROLL PROGRESS (top hairline, driven by nav.js) ── */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  z-index: 300; pointer-events: none; background: transparent;
}
.scroll-progress > span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
  box-shadow: 0 0 10px var(--gold-g);
  transition: width .1s linear;
}

/* ── NAV ── */
#site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0 var(--gutter);
  background: rgba(4,8,16,.8);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--mono); font-size: .8rem;
  color: var(--gold); letter-spacing: .18em;
  text-transform: lowercase; text-decoration: none;
  display: flex; align-items: center; gap: .6rem; flex-shrink: 0; font-weight: 700;
}
.nav-logo-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 0 rgba(46,232,154,.5); }
  50%      { box-shadow: 0 0 0 5px rgba(46,232,154,0); }
}
.nav-links { display: flex; gap: clamp(1.2rem, 2.5vw, 2.5rem); list-style: none; }
.nav-links a {
  position: relative;
  font-family: var(--mono); font-size: .7rem;
  color: var(--text2); text-decoration: none;
  letter-spacing: .12em; text-transform: uppercase;
  transition: color .2s; padding: .35rem 0;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .28s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--gold); }

.nav-actions { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }

/* language switch */
.lang-switch { display: flex; border: 1px solid var(--border2); border-radius: 3px; overflow: hidden; }
.lang-btn {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .1em;
  background: transparent; color: var(--text2); border: none;
  cursor: pointer; padding: .42rem .65rem; transition: all .15s; min-height: 34px;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active { background: var(--gold-d); color: var(--gold); }

/* hamburger (mobile only) */
.nav-toggle {
  display: none; width: 40px; height: 40px; flex: 0 0 auto;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border2);
  border-radius: 3px; color: var(--text3); cursor: pointer;
}
.nav-toggle .bar, .nav-toggle .bar::before, .nav-toggle .bar::after {
  content: ''; display: block; width: 18px; height: 1.5px; background: currentColor;
  transition: transform .3s var(--ease), opacity .2s, background .2s;
}
.nav-toggle .bar { position: relative; }
.nav-toggle .bar::before { position: absolute; top: -6px; left: 0; }
.nav-toggle .bar::after  { position: absolute; top: 6px;  left: 0; }
#site-nav.open .nav-toggle { color: var(--gold); }
#site-nav.open .nav-toggle .bar { background: transparent; }
#site-nav.open .nav-toggle .bar::before { transform: translateY(6px) rotate(45deg); }
#site-nav.open .nav-toggle .bar::after  { transform: translateY(-6px) rotate(-45deg); }

/* ── SECTION HEADER ── */
.sh { margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.sh-label {
  font-family: var(--mono); font-size: var(--fs-mono);
  color: var(--gold); letter-spacing: .22em;
  text-transform: uppercase; margin-bottom: .8rem;
  display: flex; align-items: center; gap: .7rem;
}
.sh-label::before { content: '//'; opacity: .5; }
.sh-title {
  font-family: var(--mono); font-size: var(--fs-h2);
  font-weight: 700; color: #EAF0FA; letter-spacing: -.03em; line-height: 1.15;
}
.sh-sub { margin-top: .75rem; font-size: var(--fs-lead); color: var(--text3); font-weight: 300; max-width: 580px; }

/* ── HERO ── */
#hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(7rem, 16vh, 10rem) var(--gutter) var(--section-pad);
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; width: 100%; }
.hero-inner > * { opacity: 0; animation: hero-rise .8s var(--ease-out) forwards; }
.hero-chip    { animation-delay: .05s; }
.hero-title   { animation-delay: .15s; }
.hero-tagline { animation-delay: .24s; }
.hero-roles   { animation-delay: .34s; }
.hero-links   { animation-delay: .46s; }
@keyframes hero-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.hero-chip {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--mono); font-size: var(--fs-mono);
  color: var(--green); letter-spacing: .18em; text-transform: uppercase;
  padding: .3rem .8rem; border: 1px solid rgba(46,232,154,.2); border-radius: 2px;
  background: var(--green-d); margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.hero-chip-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: pulse-dot 2.4s ease-in-out infinite; }
.hero-title {
  font-family: var(--mono); font-size: var(--fs-hero);
  font-weight: 700; color: #EAF0FA; line-height: 1.02; letter-spacing: -.035em;
  margin-bottom: clamp(1rem, 2.5vw, 1.4rem); max-width: 18ch;
}
.hero-title .accent { color: var(--gold); }
.hero-tagline {
  font-size: clamp(1rem, 2.4vw, 1.35rem); font-weight: 300; color: var(--text);
  line-height: 1.5; max-width: 56ch; margin-bottom: clamp(1.6rem, 4vw, 2.4rem);
}
.hero-roles { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: clamp(1.8rem, 5vw, 2.8rem); }
.hero-role {
  font-family: var(--mono); font-size: var(--fs-mono);
  color: var(--text3); letter-spacing: .08em; padding: .3rem .75rem;
  border: 1px solid var(--border2); border-radius: 1px;
  transition: border-color .2s, color .2s, background .2s;
}
.hero-role:hover { color: var(--text); border-color: var(--text2); }
.hero-role.active { color: var(--gold); border-color: rgba(200,168,72,.35); background: var(--gold-d); }
.hero-links { display: flex; flex-wrap: wrap; gap: .8rem; }
.btn {
  font-family: var(--mono); font-size: .65rem; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; padding: .7rem 1.4rem; border: 1px solid; border-radius: 2px;
  transition: all .18s var(--ease); display: inline-flex; align-items: center; gap: .45rem; min-height: 42px;
  cursor: pointer;
}
.btn-gold { border-color: var(--gold); color: var(--gold); background: var(--gold-d); }
.btn-gold:hover { background: rgba(200,168,72,.18); box-shadow: 0 0 20px var(--gold-g); transform: translateY(-2px); }
.btn-ghost { border-color: var(--border2); color: var(--text3); background: transparent; }
.btn-ghost:hover { border-color: var(--text3); color: var(--text); transform: translateY(-2px); }

/* ── METRICS BAR ── */
.metrics-bar { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: clamp(1.5rem,4vw,2.2rem) 0; background: var(--bg2); }
.metrics-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(.5rem, 3vw, 2rem);
}
.metric { padding: 0 clamp(.25rem, 2vw, 1.6rem); border-right: 1px solid var(--border); }
.metric:first-child { padding-left: 0; }
.metric:last-child { border-right: none; }
.metric-num {
  font-family: var(--mono); font-size: clamp(1.7rem, 5vw, 2.7rem); font-weight: 700;
  color: var(--gold); line-height: 1; margin-bottom: .35rem;
  display: flex; align-items: baseline; gap: .1rem;
}
.metric-num .plus, .metric-num .pct { font-size: .65em; color: var(--gold); opacity: .7; }
.metric-label { font-family: var(--mono); font-size: clamp(.58rem,1.5vw,.68rem); color: var(--text2); letter-spacing: .08em; text-transform: uppercase; line-height: 1.3; }

/* ── SERVICES (auto-fit: 3 → 2 → 1 columns, no hard breakpoints) ── */
#services { padding: var(--section-pad) 0; border-top: 1px solid var(--border); }
.svc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.svc-card { background: var(--bg2); padding: clamp(1.6rem, 3vw, 2.2rem) clamp(1.4rem, 2.5vw, 2rem); position: relative; overflow: hidden; transition: background .2s; }
.svc-card:hover { background: var(--bg3); }
.svc-card::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--gold) 0%, transparent 100%); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.svc-card:hover::after { transform: scaleX(1); }
.svc-card-icon { font-family: var(--mono); font-size: .68rem; color: var(--gold); letter-spacing: .15em; margin-bottom: 1.2rem; opacity: .7; }
.svc-card-title { font-family: var(--mono); font-size: 1.08rem; font-weight: 700; color: #E8F0FA; margin-bottom: .7rem; line-height: 1.3; }
.svc-card-desc { font-size: var(--fs-body); color: var(--text3); line-height: 1.7; font-weight: 300; }
.svc-card-tags { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.svc-card-tag { font-family: var(--mono); font-size: .66rem; color: var(--text2); padding: .2rem .5rem; background: var(--bg); border: 1px solid var(--border); letter-spacing: .05em; }

/* ── PROCESS (timeline) ── */
#process { padding: var(--section-pad) 0; border-top: 1px solid var(--border); }
.tl { position: relative; padding-left: clamp(1.6rem, 4vw, 2.5rem); border-left: 1px solid var(--border2); display: grid; gap: clamp(2.2rem, 5vw, 3rem); }
.tl-item { position: relative; }
.tl-dot { position: absolute; left: clamp(-1.6rem, -4vw, -2.5rem); width: 10px; height: 10px; border-radius: 50%; background: var(--bg2); border: 2px solid var(--gold); transform: translateX(calc(-50% + .5px)); top: .3rem; }
.tl-dot.active { background: var(--gold); box-shadow: 0 0 0 4px rgba(200,168,72,.15); animation: tl-pulse 2.5s ease-in-out infinite; }
@keyframes tl-pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(200,168,72,.15); } 50% { box-shadow: 0 0 0 8px rgba(200,168,72,0); } }
.tl-meta { font-family: var(--mono); font-size: .66rem; color: var(--text2); letter-spacing: .12em; margin-bottom: .6rem; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.tl-badge { padding: .1rem .45rem; border: 1px solid; border-radius: 1px; font-size: .55rem; letter-spacing: .1em; }
.tl-badge-gold { border-color: rgba(200,168,72,.3); color: var(--gold); }
.tl-title { font-family: var(--mono); font-size: clamp(1.05rem, 2.2vw, 1.2rem); font-weight: 700; color: #E8F0FA; margin-bottom: .5rem; line-height: 1.3; }
.tl-desc { font-size: var(--fs-body); color: var(--text3); line-height: 1.7; font-weight: 300; max-width: 680px; }
.tl-tech { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.tl-tech-tag { font-family: var(--mono); font-size: .66rem; color: var(--text2); padding: .2rem .5rem; background: var(--bg2); border: 1px solid var(--border); letter-spacing: .05em; }

/* ── STACK ── */
#stack { padding: var(--section-pad) 0; border-top: 1px solid var(--border); }
.stack-matrix { display: grid; gap: 0; border: 1px solid var(--border); }
.stack-row { display: grid; grid-template-columns: clamp(110px, 20vw, 160px) 1fr; border-bottom: 1px solid var(--border); }
.stack-row:last-child { border-bottom: none; }
.stack-cat { padding: clamp(1rem,2.5vw,1.4rem) clamp(1rem,2vw,1.5rem); font-family: var(--mono); font-size: .68rem; color: var(--gold); letter-spacing: .12em; text-transform: uppercase; border-right: 1px solid var(--border); background: var(--bg2); display: flex; align-items: center; }
.stack-items { padding: clamp(.9rem,2vw,1.1rem) clamp(1rem,2vw,1.5rem); display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.stack-tag { font-family: var(--mono); font-size: clamp(.68rem,1.5vw,.78rem); color: var(--text3); padding: .35rem .8rem; border: 1px solid var(--border2); background: transparent; letter-spacing: .04em; transition: all .15s; cursor: default; border-radius: 1px; }
.stack-tag:hover { color: var(--gold); border-color: rgba(200,168,72,.35); background: var(--gold-d); transform: translateY(-1px); }

/* ── CONTACT ── */
#contact { padding: clamp(5rem,11vw,9rem) 0 var(--section-pad); border-top: 1px solid var(--border); }
.contact-inner { text-align: center; }
.contact-label { font-family: var(--mono); font-size: var(--fs-mono); color: var(--text2); letter-spacing: .2em; text-transform: uppercase; margin-bottom: 1.2rem; }
.contact-title { font-family: var(--mono); font-size: var(--fs-h2); font-weight: 700; color: #EAF0FA; letter-spacing: -.03em; margin-bottom: 1rem; line-height: 1.2; }
.contact-sub { font-size: var(--fs-lead); color: var(--text3); font-weight: 300; margin-bottom: clamp(2rem,5vw,3rem); max-width: 50ch; margin-left: auto; margin-right: auto; }
.contact-email { font-family: var(--mono); font-size: clamp(.9rem, 3vw, 1.25rem); color: var(--text3); text-decoration: none; border-bottom: 1px solid var(--border2); padding-bottom: .2rem; display: inline-block; margin-bottom: clamp(2rem,5vw,3rem); transition: color .2s, border-color .2s; word-break: break-word; }
.contact-email:hover { color: var(--gold); border-color: var(--gold); }
.contact-links { display: flex; justify-content: center; gap: 2rem; margin-bottom: clamp(3rem,8vw,5rem); flex-wrap: wrap; }
.contact-link { font-family: var(--mono); font-size: .72rem; color: var(--text2); text-decoration: none; letter-spacing: .12em; text-transform: uppercase; transition: color .2s; padding: .35rem 0; }
.contact-link:hover { color: var(--gold); }
.footer { font-family: var(--mono); font-size: .66rem; color: var(--text2); letter-spacing: .08em; opacity: .5; line-height: 1.8; }

/* ── RESPONSIVE: tablet ── */
@media (max-width: 760px) {
  .metrics-inner { grid-template-columns: repeat(2, 1fr); gap: 1.4rem clamp(.5rem,3vw,2rem); }
  .metric:nth-child(2) { border-right: none; }
  .metric { border-bottom: none; }
}

/* ── RESPONSIVE: mobile nav ── */
@media (max-width: 700px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 0 0;
    flex-direction: column; justify-content: center; align-items: flex-start;
    gap: .25rem; padding: 2rem var(--gutter);
    background: rgba(4,8,16,.97); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    transform: translateY(-10px); opacity: 0; visibility: hidden;
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  }
  #site-nav.open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { font-size: 1.05rem; letter-spacing: .04em; text-transform: none; padding: 1rem 0; width: 100%; border-bottom: 1px solid var(--border); color: var(--text3); }
  .nav-links a::after { display: none; }
  .nav-links a.active { color: var(--gold); }
}
