/* R33 Autos
   Black and white from the logo, red from their R33 Security artwork. */
:root {
  --black: #000;      /* true black so the logo's outline melts into the page */
  --panel: #151515;
  --white: #f3f3f3;
  --grey:  #a8a8a8;
  --red:   #d9262e;
  --line:  rgba(243, 243, 243, .14);

  --font: "Archivo", "Arial Narrow", Arial, sans-serif;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --max: 74rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font: 400 1.0625rem/1.6 var(--font);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: var(--white); text-decoration-color: var(--red); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--font);
  font-variation-settings: "wdth" 125;
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: -.015em;
  margin: 0 0 .75rem;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 5vw, 3.4rem); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--white); color: var(--black); padding: .5rem 1rem; }

/* Buttons */
.btn {
  display: inline-block;
  padding: .7rem 1.2rem;
  font-weight: 700;
  font-variation-settings: "wdth" 112;
  text-decoration: none;
  border: 2px solid var(--red);
  border-radius: 2px;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-solid { background: var(--red); color: #fff; }
.btn-solid:hover { background: var(--white); border-color: var(--white); color: var(--black); }
.btn-line { color: var(--white); border-color: var(--white); }
.btn-line:hover { background: var(--white); color: var(--black); }
.btn-lg { padding: .95rem 1.5rem; font-size: 1.05rem; }
button.btn { font: inherit; font-weight: 700; cursor: pointer; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: calc(.6rem + env(safe-area-inset-top, 0px)) var(--pad) .6rem;
  background: rgba(0, 0, 0, .9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand img { height: 58px; width: auto; }
.header-actions { display: flex; gap: .5rem; }

/* Hero: text left, tall photo right (all their photos are portrait) */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) var(--pad);
}
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.6rem); animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.lede { max-width: 34rem; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--grey); margin: 0 0 2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-img img { width: 100%; max-height: 80vh; object-fit: cover; object-position: 50% 70%; border-bottom: 6px solid var(--red); }
@keyframes rise { from { opacity: 0; transform: translateY(1.5rem); } to { opacity: 1; transform: none; } }

/* Services */
.services { max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) var(--pad); }
.feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: end;
  margin: 2rem 0 3rem;
}
.feature img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.feature h3 { font-size: clamp(2rem, 5vw, 3.6rem); }
.feature p { color: var(--grey); font-size: 1.15rem; max-width: 34rem; }

.service-rows { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.service-rows li {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(1rem, 4vw, 3.5rem);
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.service-rows h3 { font-size: clamp(1.25rem, 2.4vw, 1.65rem); margin: 0; }
.service-rows p { margin: 0; color: var(--grey); max-width: 34rem; }

/* Project: Caddy */
.project {
  background: var(--panel);
  padding: clamp(3rem, 8vw, 6rem) max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad)));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.project-head p { color: var(--grey); max-width: 38rem; font-size: 1.1rem; }
.before-after { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 2rem 0 2.5rem; }
.before-after img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.before-after figure:last-child img { object-position: 50% 75%; }
.before-after figcaption { padding-top: .5rem; font-weight: 700; font-variation-settings: "wdth" 112; }
.before-after figure:first-child figcaption { color: var(--grey); }
.spec { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.spec > div { border-top: 3px solid var(--red); padding-top: 1rem; }
.spec h3 { font-size: 1.15rem; }
.spec p { margin: 0; color: var(--grey); font-size: .98rem; }

/* Gallery */
.work { max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) var(--pad); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 2rem; }
.gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* Contact */
.contact {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(3rem, 8vw, 6rem) max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad)));
  background: var(--panel);
  border-top: 1px solid var(--line);
}
.contact-details > p { color: var(--grey); max-width: 30rem; }
.big-link {
  display: block; width: fit-content; margin-top: 1.25rem;
  font-size: clamp(1.8rem, 4.5vw, 3rem); font-weight: 850;
  font-variation-settings: "wdth" 125;
  text-decoration: none;
  border-bottom: 4px solid var(--red);
  line-height: 1.15;
}
.big-link-sm { font-size: clamp(1.1rem, 2.4vw, 1.5rem); font-weight: 700; border-bottom-width: 2px; overflow-wrap: anywhere; }
.big-link:hover { color: var(--red); }
.info { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 2.5rem 0 2rem; }
.info dt { color: var(--grey); font-size: .9rem; }
.info dd { margin: .25rem 0 0; }
.socials { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.socials a {
  display: inline-block; padding: .5rem .9rem;
  border: 1px solid var(--line); border-radius: 2px;
  text-decoration: none; font-weight: 600;
}
.socials a:hover { border-color: var(--red); }

.contact-form { display: grid; gap: 1rem; align-content: start; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; }
.opt { color: var(--grey); font-weight: 400; }
.field input, .field textarea {
  width: 100%; padding: .8rem .9rem;
  font: inherit; color: var(--white);
  background: var(--black);
  border: 1px solid var(--line); border-radius: 2px;
}
.field input:focus, .field textarea:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px rgba(217, 38, 46, .35); }
.field textarea { resize: vertical; }
.hp { position: absolute; left: -9999px; }
.contact-form .btn { justify-self: start; }

.site-footer { padding: 1.5rem var(--pad); color: var(--grey); font-size: .9rem; border-top: 1px solid var(--line); }
.footer-inner { margin: 0 auto; max-width: var(--max); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; }
.site-footer p { margin: 0; }
.site-footer a { color: inherit; }
.site-footer a:hover { color: var(--red); }

/* Tablet */
@media (max-width: 960px) {
  .spec { grid-template-columns: 1fr 1fr; }
}

/* Mobile */
@media (max-width: 760px) {
  .header-actions .btn-line { display: none; }
  .brand img { height: 42px; }
  .hero { grid-template-columns: 1fr; padding-top: 1.5rem; }
  .hero-img { order: -1; }
  .hero-img img { aspect-ratio: 4 / 3.4; max-height: none; }
  .feature, .service-rows li, .contact { grid-template-columns: 1fr; }
  .feature img { aspect-ratio: 4 / 3; }
  .service-rows li { gap: .5rem; }
  .before-after { grid-template-columns: 1fr 1fr; }
  .before-after figure:last-child { grid-column: span 2; }
  .before-after figure:last-child img { aspect-ratio: 4 / 3; object-position: 50% 85%; }
  .spec { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .info { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero h1 { animation: none; }
  .btn { transition: none; }
}
