/* ==========================================================================
   The Rock Chip Co. — single page
   Palette is exactly three colours. No gradients, no shadows, no icons.
   ========================================================================== */

:root {
  --ink:    #0A0A0A;   /* near-black, dark field */
  --paper:  #F4F2ED;   /* warm off-white, light field. never pure white */
  --slate:  #32464A;   /* accent only: rules, micro-labels, eyebrows */

  /* The fracture: vertical drop of the diagonal edge across the full width.
     28px at 375px, ~86px at 1440px. Shallow enough that no text is clipped. */
  --frac: clamp(28px, 6vw, 86px);

  --wrap: 68rem;
  --measure: 34rem;    /* ~64 characters at body size */

  --fs-micro: 0.75rem;
  --fs-body:  1.0625rem;
  --fs-lead:  clamp(1.0625rem, 4.4vw, 1.3125rem);
  --fs-h2:    clamp(1.75rem, 6.4vw, 2.75rem);
  --fs-h1:    clamp(2.75rem, 12.5vw, 6rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

img { display: block; max-width: 100%; height: auto; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Keyboard focus is always visible and always high contrast. */
a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1rem;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Type roles
   -------------------------------------------------------------------------- */

.eyebrow {
  margin: 0 0 1.25rem;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-weight: 500;                    /* never bolder than what it labels */
  font-size: var(--fs-micro);
  line-height: 1.4;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate);
}

h1, h2 {
  font-family: Oswald, "Arial Narrow", sans-serif;
  text-transform: uppercase;
  margin: 0;
}

h2 {
  font-weight: 600;
  font-size: var(--fs-h2);
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin-bottom: 1.75rem;
  text-wrap: balance;
}

.prose p {
  margin: 0 0 1.15em;
  max-width: var(--measure);
}
.prose p:last-child { margin-bottom: 0; }

.prose a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  /* Inline links sit inside a sentence, so they're exempt from the 44px rule.
     Vertical padding on an inline box grows the hit area without moving text. */
  padding: 0.35rem 0;
}

/* Three distinct topics, separated by a hairline rather than by new words. */
.prose--ruled p + p {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--slate);
}

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */

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

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.masthead__logo { width: auto; height: 64px; }

.masthead__tel {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.25rem;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--slate);
}

/* --------------------------------------------------------------------------
   Fracture 1 — under the hero. Dark field, hard diagonal bottom edge.
   The wrapper is slate and sits 2px below the ink, leaving a hairline
   along the cut. Browsers without clip-path get a clean square edge.
   -------------------------------------------------------------------------- */

.fracture {
  background: var(--slate);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--frac)), 0 100%);
}

.hero {
  background: var(--ink);
  color: var(--paper);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--frac) - 2px), 0 calc(100% - 2px));
  padding-top: 3.25rem;
  /* the diagonal is added to the bottom padding so nothing is ever clipped */
  padding-bottom: calc(3.25rem + var(--frac));
}

.hero__head { margin: 0 0 1.5rem; }

/* Says what the business does, before the offer. Smaller than the price, but
   set as real display type so it reads at a glance rather than as a label. */
.hero__service {
  display: block;
  font-weight: 600;
  font-size: clamp(1.125rem, 5vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: 0.045em;
  color: rgba(244, 242, 237, 0.92);
  margin-bottom: 0.85rem;
  /* No max-width: the column governs. On a phone it breaks after the glued
     em dash ("...REPAIR —" / "OGDEN, UTAH"); on desktop it sets on one line. */
}

/* The loudest thing on the page. */
.hero__price {
  display: block;
  font-weight: 700;
  font-size: var(--fs-h1);
  line-height: 0.92;
  letter-spacing: -0.005em;
}

.hero__sub {
  margin: 0 0 2.25rem;
  max-width: var(--measure);
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: rgba(244, 242, 237, 0.92);
}

/* --------------------------------------------------------------------------
   The one button
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0.9rem 1.75rem;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--paper);
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: var(--fs-lead);
  letter-spacing: 0.03em;
  line-height: 1.1;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
}
.btn:hover { background: transparent; color: var(--paper); }

/* On a phone this is the only thing that matters — give it the full column. */
@media (max-width: 30rem) {
  .btn { display: flex; width: 100%; padding-left: 1rem; padding-right: 1rem; }
}
.btn:focus-visible { outline-offset: 4px; }

/* Mobile-first: touch devices open Messages. Pointer devices get tel:. */
.btn--tel { display: none; }
@media (hover: hover) and (pointer: fine) {
  .btn--sms { display: none; }
  .btn--tel { display: inline-flex; }
}

/* --------------------------------------------------------------------------
   Light-field sections
   -------------------------------------------------------------------------- */

.band { padding: 3.5rem 0; }

/* Section rule, inset to the content column rather than bleeding to the edge. */
.band > .wrap { position: relative; padding-top: 2.5rem; }
.band > .wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.25rem;
  right: 1.25rem;
  border-top: 1px solid var(--slate);
}

.band--tight { padding-top: 0; }

/* The warranty carries the most weight on the page: heavier rule, more air. */
.band--warranty { padding: 4.5rem 0; }
.band--warranty > .wrap { padding-top: 3rem; }
.band--warranty > .wrap::before { border-top-width: 3px; }

/* The businesses panel supplies its own edge. */
.band--panel > .wrap { padding-top: 0; }
.band--panel > .wrap::before { content: none; }

/* Space for the second diagonal, which rises into this section. */
.band--last { padding-bottom: calc(3.5rem + var(--frac)); }

/* Rate card — deliberately quiet, secondary to "most customers pay nothing". */
.rates {
  margin: 2.5rem 0 0;
  max-width: var(--measure);
  border-top: 1px solid var(--slate);
}
.rates__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--slate);
}
.rates dt { font-size: var(--fs-body); }
.rates dd {
  margin: 0;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: var(--fs-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Businesses — clearly a different audience. */
.panel {
  border: 1px solid var(--slate);
  border-top: 3px solid var(--slate);
  padding: 2rem 1.5rem;
}
.panel h2 { margin-bottom: 1.5rem; }
.panel__cta { margin-top: 1.5rem; }

.fineprint { margin-top: 2.75rem; max-width: var(--measure); }
.fineprint .eyebrow { margin-bottom: 0.6rem; }
.fineprint p:not(.eyebrow) { margin: 0; color: var(--slate); }

/* --------------------------------------------------------------------------
   Photographs
   Hard edges, no rounded corners, no shadows — same rules as everything else.
   Every source file is portrait, so the crop is done by object-fit rather
   than in the image itself: a taller frame on a phone, a wider one on a
   desktop, from one file. object-position keeps the subject in frame.
   -------------------------------------------------------------------------- */

.photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--ink);   /* the ground it paints against while loading */
}

/* Full-bleed band between sections. */
.photoband {
  margin: 0;
  aspect-ratio: 4 / 5;
  background: var(--ink);
}

/* Inside a section, aligned to the text column's container. */
.photofig {
  margin: 2.75rem 0 0;
  aspect-ratio: 4 / 5;
  background: var(--ink);
}

.photo--bridge { object-position: 50% 32%; }  /* keep the bridge off the top edge */
.photo--kit    { object-position: 50% 46%; }
.photo--james  { object-position: 50% 38%; }  /* keep him and the hood, drop sky */

@media (min-width: 48rem) {
  .photoband { aspect-ratio: 16 / 9; }
  .photofig  { aspect-ratio: 3 / 2; margin-top: 3.5rem; }
}

/* --------------------------------------------------------------------------
   Fracture 2 — above the footer. Same direction as the first.
   The footer is slate; the ::before layer is ink, cut 2px lower.
   -------------------------------------------------------------------------- */

.footer {
  position: relative;
  isolation: isolate;
  background: var(--slate);
  color: var(--paper);
  margin-top: calc(-1 * var(--frac));
  padding-top: calc(3.5rem + var(--frac));
  padding-bottom: 3.5rem;
  clip-path: polygon(0 var(--frac), 100% 0, 100% 100%, 0 100%);
}
.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  clip-path: polygon(0 calc(var(--frac) + 2px), 100% 2px, 100% 100%, 0 100%);
}

.footer__inner { display: flex; flex-direction: column; align-items: flex-start; }

.footer__logo { width: auto; height: 104px; margin-bottom: 1.75rem; }

.footer__tel {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 9vw, 3rem);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 2px solid rgba(244, 242, 237, 0.5);
}
.footer__tel:hover { border-bottom-color: var(--paper); }

.footer__area {
  margin: 1.5rem 0 0;
  font-size: var(--fs-body);
  color: rgba(244, 242, 237, 0.92);
}

.footer__owner {
  margin: 1.75rem 0 0;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-weight: 500;
  font-size: var(--fs-micro);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 242, 237, 0.72);
}

/* --------------------------------------------------------------------------
   Sticky call bar — mobile only
   -------------------------------------------------------------------------- */

.callbar { display: none; }

@media (max-width: 767px) {
  .callbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    min-height: 60px;
    padding: 0.85rem 1rem;
    padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
    background: var(--ink);
    border-top: 2px solid var(--slate);
    text-decoration: none;
  }
  .callbar__label {
    font-family: Oswald, "Arial Narrow", sans-serif;
    font-weight: 500;
    font-size: var(--fs-micro);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(244, 242, 237, 0.72);
  }
  .callbar__num {
    font-family: Oswald, "Arial Narrow", sans-serif;
    font-weight: 600;
    font-size: 1.375rem;
    letter-spacing: 0.03em;
    line-height: 1;
    color: var(--paper);
  }
  /* The bar sits over the footer's own padding, never over content. */
  .footer { padding-bottom: calc(3.5rem + 84px); }
}

/* --------------------------------------------------------------------------
   Wider viewports
   -------------------------------------------------------------------------- */

@media (min-width: 48rem) {
  :root { --fs-body: 1.125rem; }

  .masthead__inner { padding-top: 1.75rem; padding-bottom: 1.75rem; }
  .masthead__logo  { height: 80px; }

  .hero { padding-top: 5.5rem; padding-bottom: calc(5.5rem + var(--frac)); }
  /* At this width both lines set on one line each and hold the dark field. */
  .hero__head { margin-bottom: 1.75rem; }
  .hero__sub  { margin-bottom: 2.75rem; }

  .band { padding: 5.5rem 0; }
  .band > .wrap { padding-top: 3rem; }
  .band--tight { padding-top: 0; }
  .band--warranty { padding: 7rem 0; }
  .band--warranty > .wrap { padding-top: 3.5rem; }
  .band--panel > .wrap { padding-top: 0; }
  .band--last { padding-bottom: calc(5.5rem + var(--frac)); }

  .panel { padding: 2.75rem 2.5rem; }

  .footer { padding-top: calc(5rem + var(--frac)); padding-bottom: 5rem; }
  .footer__logo { height: 128px; }
}
