/* ============================================================
   components.css — reusable blocks: cards, form fields
   Load order: base -> layout -> components -> home -> responsive
   ============================================================ */

/* ---- CARD -------------------------------------------------------------
   One component for both product and service cards. The two used to be
   separate, declaration-for-declaration identical rule sets (.product-* and
   .service-*), so merging them changed nothing visually.

   Modifiers .card--product / .card--service carry NO declarations by design.
   They are semantic hooks so product detail pages can diverge the two later
   without touching markup. A class with no matching rules cannot affect
   rendering, which is what makes this merge provably safe.
   (.card--service currently has no markup - the service cards were retired
   and their content merged into Capabilities - but the hook stays.)

   DO NOT change .card-grid's `gap: 1px` + `background` + `border` trio: the
   1px "gaps" ARE the visible hairline dividers between cells, revealed only
   because .card paints var(--surface) over the grid's background. Change any
   one of the three and the grid's entire ruling system disappears.

   Two columns: four product cards in priority order (LACE, SNOW ANGEL /
   SWS, LIMES). Four across leaves ~207px of copy width at the 1180px
   container; three across orphans the fourth card on its own row.
   ---------------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border-mid);
  border: 1px solid var(--border-mid);
}
.card {
  background: var(--surface);
  padding: 36px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
  display: flex;
  flex-direction: column;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--vg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.card:hover::before { transform: scaleX(1); }
.card:hover { background: #f9faf8; }
.card-media {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  overflow: hidden;
  flex-shrink: 0;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  opacity: 0.45;
}
.card-media-placeholder span {
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
/* SNOW ANGEL logo animation (snow-logo.js): two stacked videos filling the
   frame, over background image 4 until the first frame paints. On the
   product page the layer is a <button> covering the promo. `[hidden]` here
   means visibility, not display: a display:none video can come back showing
   a stale frame for a beat (the finished logo flashing before the intro on a
   replay). Hidden this way it still takes no clicks or focus. */
.snow-logo-frame { position: relative; }
.snow-logo {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: url('/assets/img/products/snow-angel/snow-angel-logo-intro-v1-poster.jpg') center / cover;
  cursor: default;
}
.snow-logo[hidden], .snow-logo [hidden] { display: block; visibility: hidden; }
.snow-logo video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
button.snow-logo { cursor: pointer; }
button.snow-logo:focus-visible { outline: 2px solid var(--gold-light); outline-offset: -4px; }
.snow-logo-play {
  position: absolute;
  left: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--vg);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: background 0.2s;
}
button.snow-logo:hover .snow-logo-play { background: var(--vg-light); }
.card-eyebrow {
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.card-title {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: 0.07em;
  line-height: 1.1;
  color: var(--vg-dark);
  margin-bottom: 6px;
}
/* Five of the six cards have this element EMPTY. It is still load-bearing:
   .card is a flex column and flex items never margin-collapse, so the 16px
   margin-bottom below is real space even with no content. Deleting the empty
   <div class="card-subtitle"></div> elements shifts those cards up 16px. */
.card-subtitle {
  font-family: var(--font-ui);
  font-size: var(--fs-ui-sm);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--vg-light);
  margin-bottom: 16px;
}
.card-desc {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  color: var(--text-mid);
  line-height: 1.8;
  margin-bottom: 24px;
  flex: 1;
}
.card-specs {
  border-top: 1px solid var(--border-mid);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: var(--fs-ui-sm);
  gap: 8px;
}
.spec-key { color: var(--text-dim); }
.spec-val { color: var(--vg); font-weight: 500; text-align: right; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-family: var(--font-ui);
  font-size: var(--fs-ui-sm);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  transition: gap 0.2s;
}
.card-link:hover { gap: 14px; color: var(--gold-light); }
/* ---- CARD ACTIONS -----------------------------------------------------
   Every product card ends in one row: "Request Information" (gold outline)
   bottom-left; cards with a product page add the solid "View ..." button
   bottom-right. Buttons in the row use tighter padding than the hero's so
   two of them fit the 485px card interior at 1440 (~214 + ~230 + 12 gap).
   responsive.css stacks the row where two buttons no longer fit.
   ---------------------------------------------------------------------- */
.card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;           /* what .card-link contributed before */
}
.card-actions .btn-primary,
.card-actions .btn-gold { padding: 13px 22px; justify-content: center; }
/* The gold button sits above the .card-cta overlay (below) so it stays
   clickable inside a card whose whole surface links to the product page.
   .card.reveal is a stacking context (transform), so z-index: 1 resolves
   against the overlay's auto/0 within the card. */
.card-actions .btn-gold { position: relative; z-index: 1; }
/* ---- CARD CTA: the "View ..." button, and the whole card as its hit area.
   ::after stretches the anchor over the card (.card is position: relative);
   since the overlay is part of the <a>, hovering anywhere on the card IS
   hovering the button, so .btn-primary:hover and .card:hover::before fire
   together with no extra rules. Trade-off: text in these cards cannot be
   selected. */
.card-cta::after { content: ''; position: absolute; inset: 0; }
.card-cta svg { transition: transform 0.2s; }
.card-cta:hover svg { transform: translateX(4px); }
/* Keyboard: focus on either button lights the card's top bar like hover
   does. The outline offset stays inside the card's 36px padding because
   .card has overflow: hidden and would clip anything outside. */
.card:focus-within::before { transform: scaleX(1); }
.card-cta:focus-visible,
.card-actions .btn-gold:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.form-input, .form-textarea {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;   /* below 16px iOS Safari zooms the page when a field gets focus */
  font-weight: 400;
  padding: 13px 16px;
  outline: none;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: none;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-dim); opacity: 0.6; }
.form-input:focus, .form-textarea:focus {
  border-color: var(--vg);
  box-shadow: 0 0 0 3px var(--vg-glow);
}
.form-textarea { height: 130px; }
/* FORM STATUS */
#form-status {
  font-family: var(--font-ui);
  font-size: var(--fs-ui-sm);
  padding: 12px 16px;
  display: none;
}
#form-status.success {
  display: block;
  color: var(--vg);
  border: 1px solid var(--border-mid);
  background: var(--vg-tint);
}
#form-status.error {
  display: block;
  color: #b84040;
  border: 1px solid rgba(184,64,64,0.3);
  background: rgba(184,64,64,0.05);
}

