/* CutDrill FR flagship layer.
 * Loaded after style.css. Keeps the graphite and orange tokens.
 * Desktop photo story, compact mobile photographs, drawer navigation,
 * contact channels and the disabled enquiry state.
 */

:root {
  --muted: #3f4944;
  --radius: 8px;
}

body {
  overflow-x: clip;
}

h1 {
  max-width: 18ch;
  font-size: clamp(2.35rem, 4.6vw, 4.35rem);
  letter-spacing: -0.04em;
}

h2 {
  max-width: 24ch;
  font-size: clamp(1.75rem, 3vw, 2.7rem);
}

.button,
.service-card,
.intake-card,
.application-grid article,
.process-grid article,
.city-card,
.department-card,
.faq-list details,
.calculator-card,
.enquiry-card,
.contact-channel {
  border-radius: var(--radius);
}

.nav-toggle {
  display: none;
  min-height: 2.65rem;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius);
  background: transparent;
  color: var(--white);
  font: 800 0.72rem/1 var(--body-font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--signal);
  background: var(--ink-soft);
  color: var(--white);
}

.primary-nav {
  gap: 1.05rem;
}

.primary-nav a {
  font-size: 0.76rem;
}

.hero-grid {
  min-height: 0;
}

.hero-media {
  min-height: 460px;
  border-radius: 0 0 0 var(--radius);
}

.signal-strip strong {
  color: var(--ink);
}

.service-card {
  min-height: 280px;
  transition: background-color 0.18s ease;
}

.service-card:hover {
  background: var(--paper);
}

.advantage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.advantage-grid article {
  min-width: 0;
  padding: 1.35rem 1.25rem 1.45rem;
  background: var(--paper-bright);
}

.advantage-grid span {
  display: block;
  margin-bottom: 0.8rem;
  color: var(--signal-dark);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.advantage-grid h3 {
  margin-bottom: 0.45rem;
  font-size: 1.15rem;
}

.advantage-grid p {
  margin: 0;
  color: var(--muted);
}

.section-heading .eyebrow {
  margin-bottom: 0.85rem;
}

/* Photo story: compact without JavaScript, sticky on a wide screen once enhanced. */
:is(section.proof, section.service-evidence, section.city-projects) .cd-fr-work-story {
  width: 100%;
  min-width: 0;
}

:is(section.proof, section.service-evidence, section.city-projects) .cd-fr-work-story__steps {
  display: grid;
  gap: 22px;
}

:is(section.proof, section.service-evidence, section.city-projects) .cd-fr-work-story__step {
  display: grid;
  min-width: 0;
}

:is(section.proof, section.service-evidence, section.city-projects) .cd-fr-work-story__media {
  margin: 0;
  overflow: hidden;
  border: 1px solid #d5d9df;
  border-radius: 8px 8px 0 0;
  background: #191b1e;
}

:is(section.proof, section.service-evidence, section.city-projects) .cd-fr-work-story__media img {
  position: relative;
  inset: auto;
  display: block;
  width: 100%;
  height: 230px;
  max-height: 230px;
  object-fit: cover;
  filter: none;
  transform: none;
}

:is(section.proof, section.service-evidence, section.city-projects) .cd-fr-work-story__copy {
  min-width: 0;
  padding: 18px 20px 20px;
  border: 1px solid #d7dbe0;
  border-top: 0;
  border-bottom: 4px solid var(--signal);
  border-radius: 0 0 8px 8px;
  background: var(--white);
}

:is(section.proof, section.service-evidence, section.city-projects) .cd-fr-work-story__copy strong {
  display: block;
  max-width: none;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

:is(section.proof, section.service-evidence, section.city-projects) .cd-fr-work-story__copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

:is(section.proof, section.service-evidence, section.city-projects) .cd-fr-work-story__copy a {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

@media (min-width: 761px) {
  :is(section.proof, section.service-evidence, section.city-projects) .cd-fr-work-story.is-enhanced {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    column-gap: clamp(26px, 4vw, 58px);
    align-items: start;
  }

  :is(section.proof, section.service-evidence, section.city-projects) .cd-fr-work-story__panel {
    position: sticky;
    top: 94px;
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    height: min(66vh, 610px);
    min-height: 390px;
    overflow: hidden;
    border-radius: 8px;
    background: #191b1e;
    box-shadow: 0 18px 45px rgba(17, 19, 21, 0.16);
  }

  :is(section.proof, section.service-evidence, section.city-projects) .is-enhanced .cd-fr-work-story__media {
    position: absolute;
    inset: 0;
    border: 0;
    border-radius: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
  }

  :is(section.proof, section.service-evidence, section.city-projects) .is-enhanced .cd-fr-work-story__media.is-active {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
  }

  :is(section.proof, section.service-evidence, section.city-projects) .is-enhanced .cd-fr-work-story__media img {
    height: 100%;
    max-height: none;
    object-fit: cover;
  }

  :is(section.proof, section.service-evidence, section.city-projects) .is-enhanced .cd-fr-work-story__steps {
    grid-column: 2;
    grid-row: 1;
    gap: 0;
  }

  :is(section.proof, section.service-evidence, section.city-projects) .is-enhanced .cd-fr-work-story__step {
    display: flex;
    align-items: center;
    min-height: min(55vh, 480px);
  }

  :is(section.proof, section.service-evidence, section.city-projects) .is-enhanced .cd-fr-work-story__copy {
    width: 100%;
    border: 1px solid #d7dbe0;
    border-left: 4px solid var(--signal);
    border-radius: 8px;
    opacity: 0.62;
    transform: translateY(7px);
    transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  }

  :is(section.proof, section.service-evidence, section.city-projects) .is-enhanced .cd-fr-work-story__step.is-active .cd-fr-work-story__copy {
    border-color: var(--signal);
    opacity: 1;
    transform: none;
  }
}

/* Unenhanced galleries must not become tall blocks on a phone. */
@media (max-width: 760px) {
  .hero-media,
  .city-hero-grid > figure,
  .service-hero figure,
  .work-card,
  .work-card-featured,
  .work-card:nth-child(2),
  .city-proof-card,
  .city-proof-card:first-child,
  .city-proof-card:nth-child(2),
  .proof-card,
  .proof-wide,
  .b2b-project-grid img {
    min-height: 0;
    max-height: none;
  }

  .hero-media img,
  .city-hero-grid img,
  .service-hero img,
  .work-card img,
  .city-proof-card img,
  .proof-card img,
  .service-evidence img,
  .b2b-project-grid img {
    position: relative;
    inset: auto;
    width: 100%;
    height: 230px;
    max-height: 230px;
    object-fit: cover;
  }

  .hero-media::after,
  .work-card::after,
  .city-proof-card::after,
  .proof-card::after {
    display: none;
  }

  .work-card,
  .city-proof-card,
  .proof-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    color: var(--ink);
  }

  .work-label,
  .city-proof-card figcaption,
  .proof-card figcaption,
  .hero-media figcaption {
    position: relative;
    inset: auto;
    padding: 14px 16px 16px;
    color: var(--ink);
  }

  .work-label strong,
  .city-proof-card figcaption,
  .proof-card figcaption strong {
    color: var(--ink);
  }

  .hero-media {
    margin-inline: 0;
  }

  .site-footer .footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .site-footer .footer-grid > * {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

@media (min-width: 761px) and (max-width: 1020px) {
  .hero-media {
    min-height: 320px;
  }

  .hero-media img,
  .service-hero img,
  .city-hero-grid img {
    height: 320px;
    object-fit: cover;
  }
}

.contact-channels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 22px);
  margin-top: 8px;
}

.contact-channel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 132px;
  min-width: 0;
  padding: clamp(18px, 2.5vw, 26px);
  border: 1px solid #dadce0;
  border-bottom: 4px solid var(--signal);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-channel:hover,
.contact-channel:focus-visible {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.contact-channel strong {
  font-size: 1.15rem;
}

.contact-channel span {
  color: var(--muted);
  line-height: 1.5;
}

.contact-note,
.enquiry-status {
  max-width: 68ch;
  margin-top: 1.25rem;
  color: var(--muted);
}

.enquiry-disabled-hero {
  padding-block: clamp(36px, 5vw, 72px);
  background: var(--ink);
  color: var(--white);
}

.enquiry-disabled-hero h1 {
  max-width: 16ch;
}

.enquiry-status-panel {
  margin-top: 1.4rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-left: 4px solid var(--signal);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.enquiry-status-panel strong,
.enquiry-status-panel p {
  margin: 0;
}

.enquiry-status-panel p {
  margin-top: 0.35rem;
  color: #d7d9d2;
}

body.cutdrill-fr-privacy .privacy-hero,
body.cutdrill-fr-contact .page-hero,
body.cutdrill-fr-faq .page-hero {
  min-height: 0;
  padding-block: clamp(28px, 4vw, 64px);
}

body.cutdrill-fr-privacy .privacy-hero h1,
body.cutdrill-fr-contact .page-hero h1,
body.cutdrill-fr-faq .page-hero h1,
body.cutdrill-fr-enquiry .form-hero h1 {
  max-width: 20ch;
  margin-bottom: 0.8rem;
  font-size: clamp(2rem, 4vw, 3.15rem);
}

body.cutdrill-fr-privacy .privacy-layout {
  padding-bottom: clamp(40px, 6vw, 80px);
}

.faq-page .faq-group + .faq-group {
  margin-top: 2.5rem;
}

.faq-page .faq-group h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

@media (max-width: 1020px) {
  .site-header {
    z-index: 40;
  }

  .nav-toggle {
    display: inline-flex;
    order: 2;
  }

  .header-inner > .button {
    order: 3;
  }

  body .site-header .primary-nav {
    display: none;
    position: fixed;
    z-index: 39;
    top: 4.6rem;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: auto;
    max-height: calc(100vh - 4.6rem);
    margin: 0;
    padding: 0.35rem 0 1rem;
    overflow: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    background: #18201c;
  }

  body.nav-open .site-header .primary-nav {
    display: flex;
  }

  body .site-header .primary-nav a {
    padding: 0.95rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1rem;
  }

  .advantage-grid,
  .contact-channels {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .advantage-grid,
  .contact-channels {
    grid-template-columns: 1fr;
  }

  .contact-channel:hover,
  .contact-channel:focus-visible {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(section.proof, section.service-evidence, section.city-projects) .is-enhanced .cd-fr-work-story__media,
  :is(section.proof, section.service-evidence, section.city-projects) .is-enhanced .cd-fr-work-story__copy,
  .contact-channel {
    transition: none;
  }

  :is(section.proof, section.service-evidence, section.city-projects) .cd-fr-work-story.is-enhanced {
    display: block;
  }

  :is(section.proof, section.service-evidence, section.city-projects) .cd-fr-work-story__panel {
    position: static;
    height: auto;
    min-height: 0;
  }
}
