/* The Thread Devils — custom patch shop. Bold, punk-garage energy,
   near-black + crimson + bone. Heavy condensed display, nothing soft,
   nothing generic. Deliberately unlike every other site in the portfolio. */

:root {
  --bg:       #141414;    /* near-black */
  --bg-soft:  #1c1c1c;    /* slightly lifted near-black */
  --bg-card:  #1f1f1f;    /* card surface */
  --ink:      #f0ebe0;    /* bone/off-white */
  --muted:    #9a9488;    /* warm grey */
  --primary:  #cc2027;    /* crimson */
  --accent:   #e8411a;    /* hot orange-red for variety */
  --line:     #2e2e2e;
  --border:   #2e2e2e;
  --maxw:     1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Arial Narrow", "Franklin Gothic Medium", "Impact", "Haettenschweiler", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 17px;
}

/* Override body for prose */
body p, body li {
  font-family: "Helvetica Neue", "Segoe UI", -apple-system, Arial, sans-serif;
}

h1, h2, h3, h4 {
  font-family: "Impact", "Haettenschweiler", "Franklin Gothic Heavy", "Arial Black", "Arial Narrow", Arial, sans-serif;
  font-weight: 900;
  line-height: 1.08;
  margin: 0;
  color: var(--ink);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

a { color: var(--primary); }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 14px;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

/* ---- Header ---- */
header {
  background: rgba(20, 20, 20, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 20;
}

nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: "Impact", "Haettenschweiler", "Franklin Gothic Heavy", "Arial Black", Arial, sans-serif;
  font-size: 1.38rem;
  font-weight: 900;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand:hover { color: var(--primary); }

.nav-links { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  font-family: "Helvetica Neue", Arial, sans-serif;
  transition: color .14s;
}
.nav-links a:hover { color: var(--primary); }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(160deg, #200303 0%, var(--bg) 60%);
  border-bottom: 1px solid var(--line);
  padding: 96px 26px 78px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
}

.hero h1 {
  font-size: 3.8rem;
  max-width: 18ch;
  margin: 0 auto 22px;
  line-height: 1.02;
  color: #fff;
}

.hero h1 span { color: var(--primary); }

.hero p {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 52ch;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero .btn { margin: 0 6px 8px; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  padding: 13px 32px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-family: "Helvetica Neue", Arial, sans-serif;
  transition: background .14s, transform .14s;
  border: 2px solid var(--primary);
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}
.btn:hover { background: #a81820; transform: translateY(-2px); }

.btn-soft {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
}
.btn-soft:hover { background: var(--ink); color: var(--bg); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ---- Sections ---- */
section { padding: 68px 0; border-bottom: 1px solid var(--line); }
section.soft { background: var(--bg-soft); }

.section-head { text-align: center; max-width: 52ch; margin: 0 auto 48px; }
.section-head h2 { font-size: 2.5rem; margin-bottom: 14px; }
.section-head p { color: var(--muted); font-family: "Helvetica Neue", Arial, sans-serif; }

section h2 { font-size: 2.2rem; margin-bottom: 14px; }
section p { color: var(--muted); font-family: "Helvetica Neue", Arial, sans-serif; }

/* ---- Split layout ---- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
}
.split.reverse .ph { order: 2; }

.ph {
  position: relative;
  overflow: hidden;
  /* angled corner cut */
  clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
}
.ph::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid rgba(204, 32, 39, 0.35);
  pointer-events: none;
  clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
}
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Card grid ---- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform .16s, border-color .16s;
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform .2s;
  transform-origin: left;
}
.card:hover::before { transform: scaleX(1); }
.card:hover { transform: translateY(-4px); border-color: var(--primary); }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card-body { padding: 22px 24px 26px; }

.pill {
  display: inline-block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: var(--primary);
  border: 1px solid rgba(204, 32, 39, 0.5);
  padding: 4px 12px;
  margin-bottom: 12px;
}
.card h3 { font-size: 1.15rem; margin-bottom: 9px; }
.card p { font-size: 0.94rem; margin: 0; color: var(--muted); }

/* ---- Prose ---- */
.prose { max-width: 70ch; margin: 0 auto; }
.prose h2 { font-size: 1.8rem; margin: 48px 0 12px; }
.prose h3 { font-size: 1.35rem; margin: 32px 0 8px; }
.prose p { color: #c9c3b4; font-family: "Helvetica Neue", Arial, sans-serif; line-height: 1.75; }
.prose li { color: #c9c3b4; font-family: "Helvetica Neue", Arial, sans-serif; line-height: 1.7; margin-bottom: 10px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose a { color: var(--primary); }

.note {
  background: rgba(204, 32, 39, 0.08);
  border: 1px solid rgba(204, 32, 39, 0.3);
  border-left: 3px solid var(--primary);
  padding: 18px 22px;
  margin: 28px 0;
}
.note p { margin: 0; color: var(--ink) !important; }

/* ---- Pull quote ---- */
.pull {
  font-family: "Impact", "Arial Black", Arial, sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1.7rem;
  line-height: 1.2;
  color: var(--primary);
  text-align: center;
  max-width: 26ch;
  margin: 46px auto;
  letter-spacing: 0.04em;
}

/* ---- Steps / how-it-works ---- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; margin-top: 44px; }
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 28px 24px;
  position: relative;
}
.step-num {
  font-family: "Impact", "Arial Black", Arial, sans-serif;
  font-size: 3rem;
  font-weight: 900;
  color: rgba(204, 32, 39, 0.2);
  line-height: 1;
  margin-bottom: 12px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* ---- Specs table ---- */
.specs {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 0.92rem;
}
.specs th {
  background: var(--primary);
  color: #fff;
  text-align: left;
  padding: 12px 16px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}
.specs td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: #c9c3b4;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.specs tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

/* ---- CTA ---- */
.cta {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 76px 26px;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  border: 40px solid rgba(255,255,255,0.06);
  border-radius: 50%;
}
.cta h2 { font-size: 2.6rem; margin-bottom: 12px; color: #fff; }
.cta p { color: rgba(255,255,255,0.82); max-width: 50ch; margin: 0 auto 28px; }
.cta .btn-soft { color: #fff; border-color: #fff; }
.cta .btn-soft:hover { background: #fff; color: var(--primary); }

/* ---- Footer ---- */
footer {
  background: #0a0a0a;
  color: var(--muted);
  padding: 56px 0 28px;
  border-top: 2px solid var(--primary);
}
.footer-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 26px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 42px;
  margin-bottom: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.footer-grid h4 {
  color: #fff;
  font-family: "Impact", "Arial Black", Arial, sans-serif;
  font-size: 0.95rem;
  margin-bottom: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.footer-grid a, .footer-grid p {
  color: var(--muted);
  text-decoration: none;
  display: block;
  margin: 5px 0;
  font-size: 0.9rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.footer-grid a:hover { color: var(--primary); }
.footer-meta {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 26px;
  font-size: 0.8rem;
  color: #555;
  font-family: "Helvetica Neue", Arial, sans-serif;
  text-align: center;
}

/* ---- Brand icon ---- */
.brand-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  color: var(--primary);
}
.brand-icon path, .brand-icon circle, .brand-icon rect, .brand-icon polygon, .brand-icon line {
  vector-effect: non-scaling-stroke;
}
.brand:hover .brand-icon { color: var(--accent); transition: color 0.15s ease; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split.reverse .ph { order: 0; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2.8rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 540px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  nav { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero h1 { font-size: 2.2rem; }
}
