/* ==========================================================
   components.css  -  the reusable parts: frame, card, tag,
   buttons and the contact form.
   ========================================================== */

/* ---------- FRAME: the edge-glow outline ----------
   .frame has 1.5px of padding. Behind the padding sits .spin, a huge
   rotating conic-gradient. The .inner panel covers all but the 1.5px edge,
   so only a thin ring of the gradient shows. Rotating it shifts the light. */
.frame{
  position:relative;display:block;overflow:hidden;
  padding:1.5px;border-radius:var(--r-card);
  background:var(--card);isolation:isolate;
}
.frame>.spin{
  position:absolute;z-index:0;
  /* --sp is set by JS to a bit more than the card's diagonal, so the light always
     reaches the corners. calc(1000px*var(--u)) is the fallback for small frames. */
  width:var(--sp,1000px);height:var(--sp,1000px);left:50%;top:50%;
  margin:calc(var(--sp,1000px) / -2) 0 0 calc(var(--sp,1000px) / -2);
  background:var(--ring);will-change:transform;
  animation:spin 12s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}
.frame>.inner{
  position:relative;z-index:1;height:100%;
  border-radius:var(--r-inner);background:var(--card);overflow:hidden;
}
.frame:focus-within>.spin{opacity:1!important}

/* ---------- TAG and RULE ---------- */
.tag{
  display:inline-block;align-self:flex-start;
  font-size:calc(12px*var(--u));line-height:1.4;padding:calc(3px*var(--u)) calc(10px*var(--u));
  border:.5px solid currentColor;border-radius:calc(999px*var(--u));color:var(--amber);
}
.rule{display:block;width:calc(44px*var(--u));height:2px;background:var(--accent,var(--amber));transform-origin:0 50%}

/* ---------- BUTTON: orange gradient, rounded rectangle ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  height:calc(44px*var(--u));min-width:calc(140px*var(--u));padding:0 calc(24px*var(--u));
  border:0;border-radius:var(--r-btn);cursor:pointer;
  background:var(--grad-btn);color:#1d0d08;
  font:500 calc(15px*var(--u))/1 var(--font-body);text-decoration:none;
  -webkit-appearance:none;appearance:none;
}
.btn:active{filter:brightness(1.1)}
.btn:focus-visible{outline:2px solid var(--peach);outline-offset:calc(3px*var(--u))}
.btn-sm{height:calc(34px*var(--u));min-width:0;padding:0 calc(16px*var(--u));font-size:calc(14px*var(--u))}

/* ---------- PROJECT CARD ----------
   The home page animates these with JS; this CSS is their resting look. */
.pc{
  color:inherit;text-decoration:none;cursor:pointer;
  will-change:transform;           /* the scroll engine scales these every frame */
}
.pc:focus-visible{outline:2px solid var(--amber);outline-offset:calc(3px*var(--u))}
.pc .cover{position:absolute;inset:0;overflow:hidden;background:var(--cover,#262626);will-change:transform}
.pc .layer{
  position:absolute;left:0;right:0;top:-30px;bottom:calc(150px*var(--u));
  display:flex;align-items:center;justify-content:center;will-change:transform;
}
.pc .layer img{max-width:80%;max-height:100%;object-fit:contain}
.pc .ghost{font-family:var(--font-display);font-size:min(calc(130px*var(--u)),34vw);line-height:1;color:var(--ghost,rgba(255,255,255,.25))}
.pc .scrim{
  position:absolute;left:0;right:0;bottom:0;height:62%;
  background:linear-gradient(180deg,rgba(var(--scrim,20,16,16),0) 0%,rgba(var(--scrim,20,16,16),.9) 52%,rgb(var(--scrim,20,16,16)) 100%);
}
.pc .dim{position:absolute;inset:0;background:#0e0c0c;opacity:0;pointer-events:none;will-change:opacity}
.pc .caption{position:absolute;left:calc(18px*var(--u));right:calc(18px*var(--u));bottom:calc(18px*var(--u));display:flex;flex-direction:column;gap:calc(8px*var(--u));will-change:transform}
.pc .tag{color:var(--accent,var(--amber))}
.pc .title{font-family:var(--font-display);font-weight:400;font-size:calc(34px*var(--u));line-height:1.08;color:var(--text);overflow:hidden;padding-top:2px}
.pc .title .ch{display:inline-block;will-change:transform}
.pc .summary{font-size:calc(17px*var(--u));line-height:1.28;font-weight:500;color:var(--text-soft)}
.pc .summary .w,.intro .w,.lead .w,.c-intro .w{display:inline-block;margin-right:.28em}

/* ---------- CONTACT FORM ---------- */
.form-frame{margin-top:calc(6px*var(--u));width:100%}
.form-frame .inner{padding:calc(36px*var(--u))}
.field{margin-bottom:calc(18px*var(--u))}
.field label{display:block;margin-bottom:calc(6px*var(--u));font-size:calc(12px*var(--u));letter-spacing:.08em;color:var(--muted);transition:color .2s ease}
.field:focus-within label{color:var(--amber)}
.field input,.field textarea{
  display:block;width:100%;height:calc(54px*var(--u));padding:0 calc(16px*var(--u));
  border:1px solid var(--hairline);border-radius:var(--r-field);
  background:var(--field);color:var(--text);
  font:calc(16px*var(--u))/1.3 var(--font-body);outline:none;resize:none;
  transition:border-color .2s ease,box-shadow .2s ease;
}
.field textarea{height:calc(170px*var(--u));padding:calc(10px*var(--u)) calc(12px*var(--u))}
.field input:focus,.field textarea:focus{border-color:var(--orange);box-shadow:0 0 0 calc(3px*var(--u)) rgba(255,106,58,.16)}
.field .err{min-height:0;margin-top:calc(4px*var(--u));font-size:calc(12px*var(--u));color:#FF7A5C}
.form-status{margin-top:calc(12px*var(--u));font-size:calc(14px*var(--u));color:var(--peach)}

.pc .layer.full{inset:0}
.pc .layer.full img{max-width:none;width:100%;height:100%;object-fit:cover}
.pc .layer.logo{inset:0}
.pc .layer.logo img{width:62%;max-width:none;height:auto;max-height:none;object-fit:contain}
