/* ============================================================================
   BARE METAL BLASTING — custom styles (industrial / dark steel)
   Layout uses Tailwind utilities in the HTML; this file holds the bespoke
   components, textures, and animations.
   ========================================================================== */

:root {
  --ink: #0a0a0b;
  --panel: #121214;
  --panel2: #17181b;
  --steel: #9a9da3;
  --steel-light: #c8cbcf;
  --steel-dark: #5b5e63;
  --brand: #c1272d;
  --brand-bright: #e63329;
  --brand-deep: #8e1a1f;
  --paper: #e9eaec;
  --line: rgba(255, 255, 255, 0.07);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { -webkit-tap-highlight-color: transparent; }
html { scroll-padding-top: 6rem; }
body { overflow-x: hidden; }

/* --- Icons (the sprite uses stroked, not filled, paths) ------------------- */
.icon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: middle; }

/* --- Accessibility ------------------------------------------------------- */
.skip-link {
  position: fixed; left: 1rem; top: -100%; z-index: 100;
  background: var(--brand); color: #fff; padding: 0.6rem 1rem; border-radius: 0.5rem;
  font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: 0.05em;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--brand-bright); outline-offset: 3px; border-radius: 2px; }

/* --- Header -------------------------------------------------------------- */
#site-header { background: transparent; }
#site-header.scrolled {
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.9);
}
#site-header.scrolled nav { height: 4.25rem; }
#site-header nav { transition: height 0.3s var(--ease); }

.nav-link { position: relative; transition: color 0.2s var(--ease); }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--brand-bright); transition: width 0.25s var(--ease);
}
.nav-link:hover { color: #fff; }
.nav-link:hover::after { width: 100%; }

.mobile-link { display: block; padding: 0.85rem 0.25rem; border-bottom: 1px solid var(--line); transition: color 0.2s var(--ease); }
.mobile-link:hover { color: #fff; }

/* --- Buttons ------------------------------------------------------------- */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: 'Oswald', sans-serif; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 0.85rem 1.6rem; border-radius: 0.6rem;
  cursor: pointer; transition: transform 0.18s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease); white-space: nowrap;
}
.btn-primary {
  color: #fff; border: 1px solid var(--brand-bright);
  background: linear-gradient(180deg, var(--brand-bright), var(--brand-deep));
  box-shadow: 0 8px 24px -10px rgba(230, 51, 41, 0.7), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-primary:hover { box-shadow: 0 12px 30px -8px rgba(230, 51, 41, 0.85), inset 0 1px 0 rgba(255,255,255,0.25); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  color: var(--steel-light); border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover { color: #fff; border-color: var(--steel); background: rgba(255, 255, 255, 0.06); transform: translateY(-2px); }

/* --- Hero ---------------------------------------------------------------- */
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(900px 600px at 78% 18%, rgba(193, 39, 45, 0.30), transparent 60%),
    radial-gradient(700px 500px at 12% 90%, rgba(193, 39, 45, 0.12), transparent 60%),
    linear-gradient(135deg, #161618 0%, #0c0c0d 45%, #050506 100%);
}
.hero-bg::after {
  /* brushed-steel diagonal striations */
  content: ""; position: absolute; inset: 0; opacity: 0.5;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0.025) 0px, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 5px);
  mask-image: radial-gradient(120% 120% at 70% 30%, #000 30%, transparent 75%);
}
.grain {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.flag-strip { position: relative; padding-left: 1rem; }
.flag-strip::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 1.1em; background: var(--brand-bright); border-radius: 2px; }
.glow { text-shadow: 0 0 40px rgba(230, 51, 41, 0.45); }

.scroll-cue { position: absolute; left: 50%; bottom: 1.75rem; transform: translateX(-50%); z-index: 10; width: 26px; height: 42px; border: 2px solid rgba(255,255,255,0.25); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; background: var(--brand-bright); border-radius: 2px; animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 70% { opacity: 1; transform: translateY(12px); } 100% { opacity: 0; transform: translateY(16px); } }

/* --- Section headers ----------------------------------------------------- */
.kicker { display: inline-block; font-family: 'Oswald', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.28em; font-size: 0.8rem; color: var(--brand-bright); margin-bottom: 1rem; }
.kicker::before { content: "// "; color: var(--steel-dark); }
.section-title { font-family: 'Anton', sans-serif; text-transform: uppercase; line-height: 0.95; font-size: clamp(2.25rem, 5vw, 4rem); color: var(--paper); }
.section-sub { margin-top: 1.1rem; max-width: 44ch; color: var(--steel); font-size: 1.1rem; line-height: 1.6; }
.section-head { max-width: 60ch; }

/* --- Cards (services / benefits) ----------------------------------------- */
.card {
  position: relative; border-radius: 0.9rem; padding: 1.6rem;
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, var(--brand-bright), transparent); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.card:hover { transform: translateY(-4px); border-color: rgba(230,51,41,0.4); box-shadow: 0 24px 40px -28px rgba(0,0,0,0.9); }
.card:hover::before { transform: scaleX(1); }
.card-ico { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 0.7rem; color: var(--brand-bright); background: rgba(230, 51, 41, 0.10); border: 1px solid rgba(230, 51, 41, 0.25); margin-bottom: 1.1rem; }
.card-ico .icon { width: 1.5rem; height: 1.5rem; }
.card-title { font-family: 'Oswald', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; font-size: 1.15rem; color: var(--paper); }
.card-blurb { margin-top: 0.5rem; color: var(--steel); line-height: 1.55; font-size: 0.97rem; }

/* --- Media chips --------------------------------------------------------- */
.media-card { text-align: center; padding: 1.5rem 1rem; border-radius: 0.9rem; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); transition: transform 0.25s var(--ease), border-color 0.25s var(--ease); }
.media-card:hover { transform: translateY(-4px); border-color: rgba(230,51,41,0.4); }
.media-disc { width: 4.5rem; height: 4.5rem; margin: 0 auto 0.9rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.12); background: radial-gradient(circle at 35% 30%, #3a3b3f, #141416 70%); box-shadow: inset 0 2px 6px rgba(0,0,0,0.6); position: relative; }
.media-disc::after { content: ""; position: absolute; inset: 8px; border-radius: 999px; background-image: radial-gradient(rgba(255,255,255,0.18) 1px, transparent 1.4px); background-size: 7px 7px; opacity: 0.5; }
.media-name { font-family: 'Oswald', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--paper); font-size: 0.95rem; }
.media-blurb { margin-top: 0.35rem; color: var(--steel-dark); font-size: 0.82rem; line-height: 1.45; }

/* --- Before / After ------------------------------------------------------ */
.ba { position: relative; aspect-ratio: 4 / 3; border-radius: 0.9rem; overflow: hidden; border: 1px solid var(--line); touch-action: none; user-select: none; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba .after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.ba-tag { position: absolute; bottom: 0.75rem; z-index: 4; font-family: 'Oswald', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; padding: 0.3rem 0.7rem; border-radius: 0.4rem; color: #fff; }
.ba-tag.is-before { left: 0.75rem; background: rgba(10,10,11,0.7); border: 1px solid var(--line); }
.ba-tag.is-after { right: 0.75rem; background: var(--brand); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; background: rgba(255,255,255,0.85); z-index: 3; transform: translateX(-1px); pointer-events: none; }
.ba-handle::after { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 38px; height: 38px; border-radius: 999px; background: var(--brand-bright); border: 3px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,0.5); }
.ba-handle::before { content: "‹ ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-52%); z-index: 1; color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 1px; }
.ba-range { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ba-label { margin-top: 0.75rem; font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: 0.05em; color: var(--steel-light); text-align: center; }

/* --- Gallery ------------------------------------------------------------- */
.gallery-item { position: relative; border-radius: 0.8rem; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; background: var(--panel); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.gallery-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(10,10,11,0.7)); opacity: 0; transition: opacity 0.3s var(--ease); }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:hover::after { opacity: 1; }

/* --- About stats --------------------------------------------------------- */
.stat-card { display: flex; flex-direction: column; gap: 0.25rem; padding: 1.5rem; border-radius: 0.9rem; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); }
.stat-label { font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: 0.06em; color: var(--steel); font-size: 0.85rem; }

/* --- Contact rows -------------------------------------------------------- */
.contact-row { display: flex; align-items: center; gap: 1rem; }
.contact-ico { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; flex: none; border-radius: 0.6rem; color: var(--brand-bright); background: rgba(230,51,41,0.1); border: 1px solid rgba(230,51,41,0.25); transition: background 0.2s var(--ease); }
a.contact-row:hover .contact-ico { background: rgba(230,51,41,0.2); }
.contact-label { display: block; font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; color: var(--steel-dark); }
.contact-value { display: block; color: var(--paper); font-size: 1.05rem; }
a.contact-row:hover .contact-value { color: var(--brand-bright); }
.social-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: 0.6rem; color: var(--steel-light); border: 1px solid var(--line); background: rgba(255,255,255,0.02); transition: all 0.2s var(--ease); }
.social-btn:hover { color: #fff; border-color: var(--brand); background: var(--brand); transform: translateY(-2px); }

/* --- Quote form ---------------------------------------------------------- */
.quote-card { padding: 1.8rem; border-radius: 1rem; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); box-shadow: 0 30px 60px -40px rgba(0,0,0,0.9); }
.field label { display: block; font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.78rem; color: var(--steel); margin-bottom: 0.4rem; }
.field input, .field select, .field textarea {
  width: 100%; background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.1); border-radius: 0.55rem;
  color: var(--paper); padding: 0.75rem 0.9rem; font-family: 'Barlow', sans-serif; font-size: 1rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.field input::placeholder, .field textarea::placeholder { color: var(--steel-dark); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand-bright); box-shadow: 0 0 0 3px rgba(230,51,41,0.18); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%239a9da3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 5 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; }
.field input:invalid:not(:placeholder-shown) { border-color: var(--brand-deep); }
.form-status { margin-top: 1rem; font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.9rem; min-height: 1.2em; }
.form-status.ok { color: #5fcf6b; }
.form-status.err { color: var(--brand-bright); }
.is-loading .btn-label::after { content: "…"; }
.is-loading .btn-arrow { display: none; }

/* --- Reveal animation ---------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: none; }

/* --- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .scroll-cue { display: none; }
}
