/* ============================================
   Taylor Built — Design Tokens
   ============================================ */
:root {
  --ink: #171717;
  --red: #E30613;
  --white: #ffffff;
  --paper: #EFF1F2;
  --line: #D8DBDC;
  --grey: #6E6E6E;

  --display: 'Oswald', 'Arial Narrow', sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', 'Courier New', monospace;

  --max: 1180px;
  --gutter: 32px;
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--white);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.08;
  margin: 0;
}

p { margin: 0 0 1em; color: var(--ink); }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 14px;
}

.lede {
  font-size: 20px;
  color: var(--grey);
  max-width: 44ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 15px 26px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  cursor: pointer;
}
.btn:hover { background: var(--red); border-color: var(--red); transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn.ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* ============================================
   Measure rule — signature device
   A tick-marked horizontal rule, echoing a
   tailor's tape measure. Used as section
   dividers throughout, each labeled with a
   value relevant to the section it opens.
   ============================================ */
.measure {
  position: relative;
  height: 17px;
  width: 100%;
  background-image: repeating-linear-gradient(
    to right,
    var(--line) 0,
    var(--line) 1px,
    transparent 1px,
    transparent 40px
  );
  background-position: bottom left;
  background-size: 100% 1px;
  background-repeat: no-repeat;
}
.measure::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--line);
}
.measure .ticks {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
}
.measure .tick {
  width: 40px;
  flex: 0 0 40px;
  border-left: 1px solid var(--line);
  height: 8px;
}
.measure .tick:nth-child(5n+1) { height: 16px; }
.measure-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--grey);
  text-transform: uppercase;
  padding: 8px var(--gutter) 0;
  max-width: var(--max);
  margin: 0 auto;
}

/* ============================================
   Header
   ============================================ */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(6px);
  z-index: 40;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand .mark { width: 34px; height: 34px; }
.brand .word {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.brand .word .r { color: var(--red); }

.nav {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.nav a {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-left: 1px solid var(--line);
  position: relative;
}
.nav a:last-child { padding-right: 0; }
.nav a.current { color: var(--red); }
.nav a:hover { color: var(--red); }

.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav { display: none; }
  .nav-toggle {
    display: block;
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: none;
    border: 2px solid var(--ink);
    padding: 10px 16px;
  }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 84px;
    left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
  }
  .nav.open a {
    border-left: none;
    border-top: 1px solid var(--line);
    padding: 16px var(--gutter);
  }
}

/* ============================================
   Hero
   ============================================ */
.hero {
  padding: 96px 0 0;
}
.hero-inner {
  display: grid;
  grid-template-columns: 3px 1fr;
  gap: 40px;
  align-items: start;
}
.hero-rule {
  background: var(--ink);
  align-self: stretch;
  min-height: 100%;
}
.hero h1 {
  font-size: clamp(42px, 6.4vw, 84px);
  max-width: 15ch;
}
.hero h1 .r { color: var(--red); }
.hero .lede { margin-top: 24px; }
.hero .actions {
  display: flex;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.hero-foot {
  margin-top: 72px;
}

/* ============================================
   Section rhythm
   ============================================ */
section { padding: 88px 0; }
.section-head {
  display: grid;
  grid-template-columns: 3px 1fr;
  gap: 40px;
  margin-bottom: 56px;
}
.section-head .rule { background: var(--ink); }
.section-head h2 { font-size: clamp(28px, 3.6vw, 42px); max-width: 20ch; }
.section-head .lede { margin-top: 16px; }

.alt { background: var(--paper); }

/* ============================================
   Process steps (Measure / Cut / Fit)
   ============================================ */
.process {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.process .step {
  background: var(--white);
  padding: 40px 32px;
}
.process .tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--red);
  letter-spacing: 0.1em;
}
.process h3 {
  font-size: 24px;
  margin-top: 14px;
  margin-bottom: 14px;
}
.process p { color: var(--grey); }

@media (max-width: 760px) {
  .process { grid-template-columns: 1fr; }
}

/* ============================================
   Card grid (services preview / detail)
   ============================================ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.card {
  background: var(--white);
  padding: 40px;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}
.card .code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--grey);
  letter-spacing: 0.08em;
}
.card h3 {
  font-size: 22px;
  margin: 14px 0 12px;
}
.card p { color: var(--grey); }
.card a.more {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--red);
  color: var(--ink);
}

@media (max-width: 760px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* ============================================
   CTA band
   ============================================ */
.cta {
  background: var(--ink);
  color: var(--white);
  padding: 88px 0;
}
.cta h2 { color: var(--white); font-size: clamp(28px, 4vw, 48px); max-width: 18ch; }
.cta .lede { color: #C9CBCC; }
.cta .actions { margin-top: 32px; display: flex; gap: 16px; flex-wrap: wrap; }
.cta .btn { border-color: var(--white); }
.cta .btn:not(.ghost) { background: var(--white); color: var(--ink); }
.cta .btn:not(.ghost):hover { background: var(--red); color: var(--white); border-color: var(--red); }
.cta .btn.ghost { color: var(--white); }
.cta .btn.ghost:hover { background: var(--white); color: var(--ink); }

/* ============================================
   Footer
   ============================================ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.site-footer .brand .word { font-size: 15px; }
.site-footer .foot-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer .foot-nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey);
}
.site-footer .foot-nav a:hover { color: var(--red); }
.site-footer .tagline {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--grey);
}

/* ============================================
   About page specifics
   ============================================ */
.about-hero { padding: 96px 0 0; }
.about-body {
  display: grid;
  grid-template-columns: 3px 1fr 220px;
  gap: 40px;
}
.about-body .rule { background: var(--ink); }
.about-body .prose { max-width: 62ch; }
.about-body .prose p { color: var(--ink); font-size: 18px; }
.about-body .prose p + p { margin-top: 1.2em; }

.ticket {
  border-left: 1px solid var(--line);
  padding-left: 28px;
}
.ticket dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-top: 26px;
}
.ticket dt:first-child { margin-top: 0; }
.ticket dd {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
}

@media (max-width: 900px) {
  .about-body { grid-template-columns: 3px 1fr; }
  .ticket { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 32px; }
}

.principles {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 48px;
}
.principle .code { font-family: var(--mono); font-size: 12px; color: var(--red); }
.principle h4 { font-size: 18px; margin: 10px 0 8px; }
.principle p { color: var(--grey); font-size: 15px; }

@media (max-width: 760px) {
  .principles { grid-template-columns: 1fr; }
}

/* ============================================
   Contact page
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 8px;
}
.field input,
.field textarea {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--ink);
  background: transparent;
  padding: 10px 2px;
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
}
.field textarea { resize: vertical; min-height: 120px; }

.contact-detail { }
.contact-detail dt {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-top: 28px;
}
.contact-detail dt:first-child { margin-top: 0; }
.contact-detail dd {
  margin: 6px 0 0;
  font-size: 18px;
}

/* Page-specific hero rule spacer under fixed header on non-home pages */
.page-hero {
  padding: 64px 0 0;
}
.page-hero h1 { font-size: clamp(36px, 5.4vw, 60px); }
