/* Katana Concrete concept demo. Plain CSS, no build step.
   One idea runs through the page: the cut. The same rising diagonal (the angle of the
   sword in the logo) appears on the hero photo, the before/after blade and the contact band. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100% 125%;
  font-display: swap;
  src: url("../fonts/archivo-var-latin.woff2") format("woff2");
}

:root {
  --slab: #dfe0de;      /* cured concrete: the page */
  --slab-deep: #c9cbc9; /* troweled edge: rules and quiet fills */
  --ink: #000;          /* the K in the logo */
  --text: #1f1f1f;
  --red: #cc0000;       /* the logo's red */
  --hilt: #dcd21c;      /* the sword's grip */
  --white: #fff;

  --gutter: clamp(1.25rem, 5vw, 3rem);
  --max: 1180px;
  --edge: max(var(--gutter), calc((100vw - var(--max)) / 2));
  --band: clamp(4rem, 9vw, 7.5rem);
  --wide: 125%;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--slab);
  color: var(--text);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a[href^="tel:"] { white-space: nowrap; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

h1, h2, h3 {
  color: var(--ink);
  font-weight: 800;
  font-stretch: var(--wide);
  letter-spacing: -0.02em;
  line-height: 1;
  text-wrap: balance;
}
h1 { font-size: clamp(2.7rem, 6.6vw, 5.5rem); line-height: 0.94; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.25rem); }
h3 { font-size: clamp(1.45rem, 2.8vw, 2.25rem); line-height: 1.04; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.dark :focus-visible { outline-color: var(--hilt); }

.wrap { padding-inline: var(--edge); }
.skip {
  position: absolute; left: -999px; top: 0; z-index: 50;
  background: var(--ink); color: var(--white); padding: 0.75rem 1rem;
}
.skip:focus { left: 0; }

/* ---------- Demo label ---------- */
.demo-strip {
  background: var(--ink); color: var(--white);
  font-size: 0.8125rem; line-height: 1.3; text-align: center;
  padding: 0.45rem var(--gutter);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3.25rem; padding: 0.7rem 1.9rem;
  font: inherit; font-weight: 700; font-size: 1.0625rem; line-height: 1.1; text-decoration: none; white-space: nowrap;
  color: var(--white); background: var(--red); border: 0; cursor: pointer;
  /* the cut again, small */
  clip-path: polygon(0.7rem 0, 100% 0, calc(100% - 0.7rem) 100%, 0 100%);
  transition: background-color 0.15s;
}
.btn:hover { background: #a80000; }
.btn--ink { background: var(--ink); }
.btn--ink:hover { background: #2b2b2b; }
.btn:focus-visible { clip-path: none; }
.btn { scroll-margin-block: 1.25rem; }

/* ---------- Header ---------- */
.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 0.6rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--ink); min-height: 2.75rem; }
.brand img { width: 3.25rem; height: auto; }
.brand b { font-weight: 800; font-stretch: var(--wide); font-size: 1.125rem; letter-spacing: -0.01em; line-height: 1.05; }
.brand small { display: block; font-size: 0.8125rem; font-weight: 500; font-stretch: 100%; letter-spacing: 0; color: #4a4a4a; }
.head-call {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  font-weight: 700; font-size: 1.0625rem;
  text-underline-offset: 0.25em; text-decoration-thickness: 2px; text-decoration-color: var(--red);
}

/* ---------- Hero ---------- */
.hero { display: grid; }
.hero__photo { position: relative; overflow: hidden; height: 50svh; min-height: 18rem; background: var(--red);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3rem), 0 100%); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; background: #5a3a2e;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3.6rem), 0 calc(100% - 0.6rem)); }
.hero__text { padding-block: 1.75rem 3.5rem; }
.lead { font-size: clamp(1.125rem, 1.7vw, 1.3125rem); line-height: 1.5; max-width: 34rem; margin-top: 1.25rem; }
.options { margin-top: 0.5rem; font-size: clamp(1.125rem, 1.7vw, 1.3125rem); line-height: 1.5; font-weight: 700; color: var(--ink); }
.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.9rem; }
.cta .btn { flex: 1 1 15rem; }
.where { margin-top: 1.4rem; font-size: 0.9375rem; color: #3d3d3d; }

@media (min-width: 880px) {
  .hero { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); min-height: min(86vh, 50rem); }
  .hero__text { order: -1; align-self: center; padding: 2rem 2rem 4rem var(--edge); }
  .hero__photo { height: auto; clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%); }
  .hero__photo img { position: absolute; inset: 0; object-position: 50% 20%; clip-path: polygon(calc(22% + 0.75rem) 0, 100% 0, 100% 100%, 0.75rem 100%); }
  .cta .btn { flex: 0 0 auto; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__photo { animation: cut-m 0.9s cubic-bezier(0.7, 0, 0.2, 1) both; }
  .hero__photo img { animation: settle 1.6s cubic-bezier(0.2, 0.6, 0.2, 1) both; }
  @keyframes cut-m {
    from { clip-path: polygon(0 0, 0 0, 0 calc(100% - 3rem), 0 100%); }
    to { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3rem), 0 100%); }
  }
  @keyframes settle { from { transform: scale(1.12); } to { transform: scale(1); } }
  @media (min-width: 880px) {
    .hero__photo { animation-name: cut-d; }
    @keyframes cut-d {
      from { clip-path: polygon(122% 0, 122% 0, 100% 100%, 100% 100%); }
      to { clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%); }
    }
  }
}

/* ---------- Before / after blade ---------- */
.dark { background: var(--ink); color: #e9e9e9; }
.dark h2, .dark h3 { color: var(--white); }
.reveal { padding-block: var(--band); }
.reveal__head { display: grid; gap: 0.9rem; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.reveal__head p { max-width: 36rem; color: #cfcfcf; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); }
@media (min-width: 880px) {
  .reveal__head { grid-template-columns: 1.1fr 0.9fr; align-items: end; gap: 3rem; }
}

.compare {
  --p: 50; --s: 6;
  position: relative; overflow: hidden; aspect-ratio: 4 / 5; max-height: 82svh; background: #222;
  touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none;
}
@media (min-width: 700px) { .compare { aspect-ratio: 16 / 9; } }
.compare__img {
  position: absolute; inset: 0;
  /* One collage photo from his site: bare concrete on its left half, finished floor on its right half. */
  background-image: url("https://img1.wsimg.com/isteam/ip/ae1cff4f-11a1-4bfc-962f-42082ebc2dd2/IMG_3417.jpeg/:/rs=w:1600,m");
  background-repeat: no-repeat; background-size: 212% auto;
}
@media (min-width: 700px) {
  .compare__img { background-image: url("https://img1.wsimg.com/isteam/ip/ae1cff4f-11a1-4bfc-962f-42082ebc2dd2/IMG_3417.jpeg/:/rs=w:2560,m"); }
}
.compare__img--before { background-position: 2% 38%; }
.compare__img--after {
  background-position: 98% 50%;
  clip-path: polygon(calc((var(--p) + var(--s)) * 1%) 0, 100% 0, 100% 100%, calc((var(--p) - var(--s)) * 1%) 100%);
}
.compare__blade { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.compare__blade line { vector-effect: non-scaling-stroke; }
.compare__grip {
  position: absolute; top: 50%; left: clamp(2.25rem, calc(var(--p) * 1%), calc(100% - 2.25rem));
  width: 3.5rem; height: 3.5rem; margin: -1.75rem 0 0 -1.75rem;
  background: var(--hilt); border: 3px solid var(--ink); border-radius: 50%;
  display: grid; place-items: center; pointer-events: none;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
}
.compare__grip svg { width: 1.75rem; height: 1.75rem; }
/* Each label lives inside its own photo, so the cut hides it along with the photo. */
.compare__tag {
  position: absolute; bottom: 0.9rem; padding: 0.3rem 0.8rem;
  background: var(--ink); color: var(--white); font-weight: 700; font-size: 0.9375rem;
}
.compare__tag--before { left: 0.9rem; }
.compare__tag--after { right: 0.9rem; background: var(--red); }
.compare__range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; pointer-events: none;
  -webkit-appearance: none; appearance: none;
}
/* Without JavaScript the photo is a fixed half-and-half, so the drag handle and hint stay hidden. */
html:not(.js) .compare__grip, html:not(.js) .compare__hint { display: none; }
html:not(.js) .compare { cursor: default; }
.compare__range:focus-visible ~ .compare__grip { outline: 3px solid var(--white); outline-offset: 4px; }
.compare__hint { margin-top: 0.9rem; font-size: 0.9375rem; color: #c4c4c4; }

/* ---------- Services ---------- */
.services { padding-block: var(--band) calc(var(--band) * 0.75); }
.service { margin-top: clamp(2.5rem, 5vw, 4rem); }
.service::before { content: ""; display: block; height: 3px; background: var(--ink); margin: 0 var(--edge) 1.5rem; }
.service__text { padding-inline: var(--edge); margin-bottom: 1.5rem; }
.service__text p { margin-top: 0.7rem; max-width: 32rem; font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); }

/* Phones and tablets: a strip of his photos to swipe through. */
.rail {
  display: flex; gap: 0.6rem; overflow-x: auto; overscroll-behavior-x: contain;
  padding: 0 var(--edge) 0.9rem; scroll-snap-type: x proximity; scroll-padding-inline: var(--edge);
  scrollbar-width: thin; scrollbar-color: var(--ink) var(--slab-deep);
}
.rail:focus-visible { outline-offset: -3px; }
.rail li { flex: none; scroll-snap-align: start; min-width: 0; }
.rail img { height: clamp(15rem, 34vw, 23rem); width: auto; max-width: none; background: var(--slab-deep); }

/* Wide screens: one large photo and four smaller ones, all in view at once. */
@media (min-width: 980px) {
  .service__text { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 3rem; align-items: end; }
  .service__text p { margin-top: 0; }
  .rail {
    display: grid; grid-template-columns: 1.55fr 1fr 1fr; grid-template-rows: 17.5rem 17.5rem; gap: 0.6rem;
    overflow: visible; padding: 0 var(--edge);
  }
  .rail li:first-child { grid-row: 1 / span 2; }
  .rail li:nth-child(n + 6) { display: none; }
  .rail img { width: 100%; height: 100%; object-fit: cover; }
  .service--flip .rail { grid-template-columns: 1fr 1fr 1.55fr; }
  .service--flip .rail li:first-child { grid-column: 3; }
}

/* ---------- Recent jobs ---------- */
.recent { padding-block: calc(var(--band) * 0.7); background: var(--slab-deep); }
.recent__grid { display: grid; gap: 1.5rem; }
.recent__intro p { margin-top: 0.6rem; }
.recent__intro a {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  font-weight: 700; color: var(--ink); text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 0.25em;
}
.jobs li { padding: 0.85rem 0; border-top: 2px solid var(--ink); font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); line-height: 1.4; font-weight: 500; color: var(--ink); }
.jobs li:last-child { border-bottom: 2px solid var(--ink); }
@media (min-width: 880px) {
  .recent__grid { grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr); gap: 0; }
  .recent__intro { padding-right: 2.5rem; }
}

/* ---------- About + tool repair ---------- */
.about { padding-block: var(--band); }
.about__grid { display: grid; gap: 3rem; }
.about__main p { margin-top: 1.1rem; max-width: 36rem; }
.about__main .big { font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.35; font-weight: 600; color: var(--ink); max-width: 30rem; }
.tech { border-top: 3px solid var(--ink); padding-top: 1.5rem; align-self: start; }
.tech p { margin-top: 0.9rem; max-width: 30rem; }
.tech a { display: inline-block; padding-block: 0.7rem; font-weight: 700; color: var(--ink); text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
@media (min-width: 880px) { .about__grid { grid-template-columns: 1.15fr 0.85fr; gap: 4rem; } .tech { margin-top: 0.6rem; } }

/* ---------- Contact ---------- */
.contact-cut { background: var(--red); clip-path: polygon(0 clamp(1.75rem, 5vw, 4.5rem), 100% 0, 100% 100%, 0 100%); }
.contact {
  padding-block: calc(var(--band) + 2rem) var(--band);
  clip-path: polygon(0 calc(clamp(1.75rem, 5vw, 4.5rem) + 0.6rem), 100% 0.6rem, 100% 100%, 0 100%);
}
.contact__grid { display: grid; gap: 3rem; }
.contact__phone {
  display: inline-flex; align-items: center; min-height: 2.75rem; margin-top: 1rem; color: var(--white); text-decoration: none;
  font-weight: 800; font-stretch: var(--wide); letter-spacing: -0.02em; line-height: 1.1;
  font-size: clamp(2.1rem, 6vw, 4.25rem);
}
.contact__phone:hover { color: var(--hilt); }
.contact__main p { margin-top: 1rem; max-width: 30rem; color: #cfcfcf; }
.contact__mail { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--white); font-weight: 600; text-underline-offset: 0.25em; overflow-wrap: anywhere; }

.form { display: grid; gap: 1rem; }
.form label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.9375rem; color: var(--white); }
.form input, .form select, .form textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--white);
  border: 2px solid var(--white); border-radius: 0; padding: 0.7rem 0.8rem; width: 100%; min-height: 3rem;
}
.form input[type="file"] { background: transparent; color: #e3e3e3; border-color: #5a5a5a; padding: 0.55rem 0.6rem; }
.form textarea { min-height: 7rem; resize: vertical; }
.form__row { display: grid; gap: 1rem; }
@media (min-width: 560px) { .form__row { grid-template-columns: 1fr 1fr; } }
.form .btn { justify-self: start; }
.form__note, .form__status { font-size: 0.9375rem; color: #e3e3e3; border-left: 0.3rem solid var(--hilt); padding-left: 0.75rem; }
.form__status:empty { display: none; }
.form__status a { display: inline-block; padding-block: 0.7rem; color: var(--white); font-weight: 600; }
@media (min-width: 880px) { .contact__grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }

/* ---------- Footer ---------- */
.site-foot { background: var(--ink); color: #c9c9c9; padding-block: 1.5rem 2.5rem; font-size: 0.9375rem; border-top: 1px solid #2c2c2c; }
.site-foot__grid { display: flex; flex-wrap: wrap; gap: 0.5rem 2.5rem; align-items: center; justify-content: space-between; }
.site-foot a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--white); text-underline-offset: 0.2em; }
.site-foot ul { display: flex; flex-wrap: wrap; gap: 0 1.75rem; }
.site-foot .demo-note { margin-top: 1rem; color: #b5b5b5; max-width: 46rem; }
@media (max-width: 879.98px) { html:not(.js) .site-foot { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); } }

/* ---------- Phone call bar ---------- */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr 1fr; background: var(--ink);
  padding-bottom: env(safe-area-inset-bottom);
  transition: transform 0.25s;
}
.callbar a { display: grid; place-items: center; min-height: 3.5rem; font-weight: 700; text-decoration: none; color: var(--white); }
.callbar a:first-child { background: var(--red); }
.callbar a:focus-visible { outline-color: var(--white); outline-offset: -5px; }
.callbar.is-hidden { transform: translateY(110%); visibility: hidden; transition: transform 0.25s, visibility 0s 0.25s; }
@media (min-width: 880px) { .callbar { display: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .callbar, .callbar.is-hidden { transition: none; } }
