/* Rainbow Flooring Cheshire.
   Direction: the client's own logo. Five colour bars over silver and gold lettering on black.
   The bars are the only decoration on the site. Jost (geometric, wide-tracked like the logo)
   for display, Figtree for reading. No cards with icons, no glass, no fade-ups. */

@font-face { font-family: 'Jost'; font-weight: 300; font-display: swap; src: url('/assets/fonts/jost-300.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-weight: 400; font-display: swap; src: url('/assets/fonts/jost-400.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-weight: 500; font-display: swap; src: url('/assets/fonts/jost-500.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-weight: 600; font-display: swap; src: url('/assets/fonts/jost-600.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 400; font-display: swap; src: url('/assets/fonts/figtree-400.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 500; font-display: swap; src: url('/assets/fonts/figtree-500.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 600; font-display: swap; src: url('/assets/fonts/figtree-600.woff2') format('woff2'); }

:root {
  --black: #000;
  --coal: #121110;
  --ivory: #ece7db;
  --silver: #c9c4b8;
  --mute: #8f8a7e;
  --gold: #d4b96a;
  --line: rgba(236, 231, 219, .14);
  --r1: #e2472b; --r2: #f0b32a; --r3: #78bd3c; --r4: #27a79a; --r5: #4d5fcb;
  --display: 'Jost', 'Futura', 'Avenir Next', sans-serif;
  --body: 'Figtree', 'Avenir', 'Helvetica Neue', sans-serif;
  --pad: clamp(16px, 5vw, 72px);
  --max: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--black); color: var(--ivory); font: 400 17px/1.6 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); font-weight: 300; line-height: 1.05; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(38px, 6.2vw, 78px); }
h2 { font-size: clamp(30px, 4.2vw, 52px); }
h3 { font-size: clamp(20px, 2.2vw, 26px); font-weight: 400; margin-top: 1.6em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ivory); color: var(--black); padding: 8px 12px; }
.skip:focus { left: 8px; z-index: 100; }

/* The signature: five bars from the logo */
.bars { display: flex; gap: 6px; width: 150px; height: 5px; margin: 10px 0 26px; }
.bars i { flex: 1; display: block; }
.bars i:nth-child(1) { background: var(--r1); }
.bars i:nth-child(2) { background: var(--r2); }
.bars i:nth-child(3) { background: var(--r3); }
.bars i:nth-child(4) { background: var(--r4); }
.bars i:nth-child(5) { background: var(--r5); }

/* Buttons */
.btn { display: inline-block; font: 500 13px/1 var(--display); letter-spacing: .18em; text-transform: uppercase; padding: 17px 26px 15px; border: 1px solid var(--ivory); border-radius: 2px; transition: background .2s, color .2s; white-space: nowrap; }
.btn-ivory { background: var(--ivory); color: var(--black); }
.btn-ivory:hover { background: #fff; }
.btn-line { color: var(--ivory); }
.btn-line:hover { background: var(--ivory); color: var(--black); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4em; }
.link { font: 500 13px/1 var(--display); letter-spacing: .18em; text-transform: uppercase; border-bottom: 1px solid var(--gold); padding-bottom: 4px; color: var(--gold); }

/* Header */
.top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 10px var(--pad); background: rgba(0,0,0,.92); border-bottom: 1px solid var(--line); }
.brand img { width: 118px; height: auto; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) { font: 500 12px/1 var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--silver); padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:not(.btn):hover { color: var(--ivory); border-bottom-color: var(--gold); }
.nav-cta { padding: 13px 20px 11px; }
.burger { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.burger span { display: block; height: 2px; background: var(--ivory); margin: 7px 0; transition: transform .2s; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* Hero */
.hero, .svc-hero { position: relative; min-height: 86vh; display: grid; align-items: end; overflow: hidden; }
.svc-hero { min-height: 64vh; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after, .svc-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.45) 45%, rgba(0,0,0,.05) 100%); }
.hero-text { position: relative; z-index: 1; padding: 40px var(--pad) 56px; max-width: 860px; }
.hero-text p { font-size: clamp(17px, 1.6vw, 21px); color: var(--silver); max-width: 560px; }
.crumb { font: 500 12px/1 var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.crumb a { color: var(--silver); }

/* Strip under the hero */
.strip { padding: 22px var(--pad); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.strip .bars { margin: 0; flex: 0 0 150px; }
.strip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; font: 500 12px/1.4 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--silver); }

/* Sections */
.sec { padding: clamp(56px, 8vw, 110px) var(--pad); max-width: var(--max); margin: 0 auto; }
.sec-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px 40px; margin-bottom: 36px; }
.sec-head h2 { grid-column: 1; margin: 0; }
.sec-head .bars { grid-column: 1; }
.sec-head p { grid-column: 1; color: var(--silver); max-width: 620px; margin: 0; }
.sec-head .link { grid-column: 2; grid-row: 1 / span 3; align-self: end; margin-bottom: 30px; }

/* Work grid */
.work-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 240px; gap: 10px; }
.tile { position: relative; overflow: hidden; background: var(--coal); }
.tile-big { grid-column: span 2; grid-row: span 2; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile:hover img { transform: scale(1.04); }
.tile span { position: absolute; left: 14px; bottom: 12px; font: 500 11px/1 var(--display); letter-spacing: .2em; text-transform: uppercase; background: rgba(0,0,0,.72); padding: 8px 10px; }

/* Services */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.svc-grid-3 { grid-template-columns: repeat(3, 1fr); }
.svc { display: grid; grid-template-rows: 200px auto auto; background: var(--coal); overflow: hidden; }
.svc img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.svc:hover img { transform: scale(1.04); }
.svc-name { font: 400 22px/1.1 var(--display); padding: 16px 16px 4px; }
.svc-short { font-size: 15px; color: var(--mute); padding: 0 16px 18px; }

/* About */
.about-grid, .contact-grid, .two-col { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: start; }
.about-img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; }
.rule-list { list-style: none; margin: 1.4em 0 0; padding: 0; }
.rule-list li { padding: 14px 0 14px 28px; border-top: 1px solid var(--line); position: relative; }
.rule-list li:last-child { border-bottom: 1px solid var(--line); }
.rule-list li::before { content: ''; position: absolute; left: 0; top: 24px; width: 14px; height: 3px; background: var(--gold); }

/* Band */
.band { position: relative; min-height: 440px; display: grid; align-items: center; overflow: hidden; }
.band-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.band-text { position: relative; z-index: 1; padding: 64px var(--pad); max-width: 620px; }
.band-text p { color: var(--ivory); }

/* Reviews */
.review-fb { border: 1px solid var(--line); padding: clamp(28px, 4vw, 56px); max-width: 720px; }
.review-big { font: 300 clamp(26px, 3.4vw, 40px)/1.15 var(--display); margin-bottom: .5em; }

/* Contact */
.contact-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 24px; margin: 1.6em 0 0; }
.contact-list dt { font: 500 12px/1.8 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.contact-list dd { margin: 0; font-size: 19px; }
.areas { color: var(--mute); font-size: 15px; }

/* Form */
.form { background: var(--coal); padding: clamp(22px, 3vw, 40px); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { display: block; margin-bottom: 14px; font: 500 12px/1 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--silver); }
.form input, .form textarea { display: block; width: 100%; margin-top: 8px; background: var(--black); border: 1px solid var(--line); color: var(--ivory); font: 400 16px/1.4 var(--body); padding: 12px 14px; border-radius: 2px; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--gold); }
.form .btn { width: 100%; text-align: center; margin-top: 6px; }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 12px 0 0; font-size: 15px; color: var(--gold); min-height: 1.4em; }

/* Page head, gallery */
.page-head { padding: clamp(56px, 8vw, 100px) var(--pad) 10px; max-width: var(--max); margin: 0 auto; }
.page-head p { color: var(--silver); max-width: 640px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 20px var(--pad) 30px; max-width: var(--max); margin: 0 auto; }
.filters button { background: none; border: 1px solid var(--line); color: var(--silver); font: 500 12px/1 var(--display); letter-spacing: .18em; text-transform: uppercase; padding: 11px 14px 9px; border-radius: 2px; cursor: pointer; }
.filters button.is-on, .filters button:hover { border-color: var(--ivory); color: var(--ivory); }
.masonry { columns: 4 260px; column-gap: 10px; padding: 0 var(--pad) 40px; max-width: var(--max); margin: 0 auto; }
.m-item { display: block; break-inside: avoid; margin-bottom: 10px; position: relative; background: var(--coal); }
.m-item[hidden] { display: none; }
.m-item span { position: absolute; left: 10px; bottom: 10px; font: 500 10px/1 var(--display); letter-spacing: .2em; text-transform: uppercase; background: rgba(0,0,0,.72); padding: 7px 9px; }
.work-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.work-row img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.cta-band { text-align: left; padding: clamp(56px, 8vw, 100px) var(--pad); max-width: var(--max); margin: 0 auto; border-top: 1px solid var(--line); }

/* Service page */
.craft { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; margin: 0; }
.craft div { border-top: 1px solid var(--line); padding: 22px 0; }
.craft dt { font: 400 22px/1.2 var(--display); margin-bottom: 6px; }
.craft dd { margin: 0; color: var(--silver); }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font: 400 20px/1.3 var(--display); padding: 18px 40px 18px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 14px; font-size: 26px; color: var(--gold); }
.faq details[open] summary::after { content: '–'; }
.faq p { color: var(--silver); padding-bottom: 18px; max-width: 760px; }
.prose { max-width: 760px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.94); display: grid; place-items: center; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--ivory); font-size: 40px; cursor: pointer; width: 56px; height: 56px; }
.lb-close { top: 10px; right: 10px; }
.lb-prev { left: 6px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 6px; top: 50%; transform: translateY(-50%); }

/* Footer */
.foot { padding: 56px var(--pad) 28px; border-top: 1px solid var(--line); max-width: var(--max); margin: 0 auto; }
.foot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.foot-logo { width: 150px; }
.foot-strap { color: var(--mute); max-width: 380px; margin-top: 16px; }
.foot-col p { margin: 0 0 8px; }
.foot-col a:hover { color: var(--gold); }
.foot-bars .bars { width: 100%; max-width: none; margin: 40px 0 20px; gap: 4px; height: 3px; }
.foot-small { color: var(--mute); font-size: 13px; margin: 0; }
.foot-small a { border-bottom: 1px solid var(--line); }

/* Responsive */
@media (max-width: 960px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .svc-grid, .svc-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid, .two-col, .craft { grid-template-columns: 1fr; }
  .about-img { min-height: 320px; }
  .work-row { grid-template-columns: repeat(3, 1fr); }
  .sec-head { grid-template-columns: 1fr; }
  .sec-head .link { grid-column: 1; grid-row: auto; margin: 12px 0 0; justify-self: start; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { position: fixed; inset: 64px 0 auto 0; background: var(--black); flex-direction: column; align-items: flex-start; gap: 0; padding: 10px var(--pad) 24px; border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform .25s; }
  .nav.is-open { transform: none; }
  .nav a:not(.btn) { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-cta { margin-top: 16px; }
  .burger { display: block; }
  .hero { min-height: 78vh; }
  .hero-text { padding-bottom: 40px; }
  .cta-row .btn { width: 100%; text-align: center; }
  .strip { gap: 16px; }
  .strip-list { gap: 6px 18px; font-size: 11px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .work-row { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr; }
  .svc { grid-template-rows: 150px auto auto; }
  .svc-name { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile img, .svc img, .nav { transition: none; }
}
