/* ------------------------------------------------ */
/* Hawthorn Security - project overrides            */
/* Loaded after the vendor theme (main.css).        */
/* Keep theme edits here so main.css stays an       */
/* unmodified upstream file.                        */
/* ------------------------------------------------ */

/* --- Stacking case study cards ------------------- */

/* The theme hides .portfolio-stack__descr below 768px, which leaves the stack
   cards as unlabelled gradient blocks on phones. Case studies need their title
   readable at every width. */
.portfolio-stack__descr {
  display: block;
}

@media only screen and (max-width: 767px) {
  .portfolio-stack__descr {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 2rem 2.4rem 2rem;
    /* The gradient behind the text runs light-on-dark; keep contrast up where
       the card is shortest and the text sits over the busiest part of it. */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0) 100%);
  }
}

/* The stack cards are links; strip the default underline and inherit colour. */
a.portfolio-stack__inner,
a.portfolio-stack__inner:hover,
a.portfolio-stack__inner:focus {
  text-decoration: none;
  color: inherit;
}

.portfolio-stack__more {
  display: inline-block;
  margin-top: 1.6rem;
  color: var(--neutral-white);
  opacity: 0.75;
}

a.portfolio-stack__inner:hover .portfolio-stack__more {
  opacity: 1;
  text-decoration: underline;
}

/* --- Service / case study cards as links --------- */

a.cards__card,
a.cards__card:hover,
a.cards__card:focus {
  text-decoration: none;
  color: inherit;
}

.cards__more {
  display: inline-block;
  margin-top: 2rem;
}

a.cards__card:hover .cards__more {
  text-decoration: underline;
}

/* --- Breadcrumb on collection pages -------------- */

.page-breadcrumb {
  margin-bottom: 1.6rem;
}

.page-breadcrumb span {
  margin: 0 0.6rem;
  opacity: 0.5;
}

/* --- Markdown prose blocks ----------------------- */

/* Body copy rendered from a collection item's markdown. The theme styles
   headings and paragraphs globally, so this only needs rhythm and measure. */
.prose-block {
  max-width: 76rem;
}

.prose-block h2 {
  margin-top: 4.8rem;
  margin-bottom: 1.6rem;
}

.prose-block h3 {
  margin-top: 3.2rem;
  margin-bottom: 1.2rem;
}

.prose-block h2:first-child,
.prose-block h3:first-child {
  margin-top: 0;
}

.prose-block p {
  margin-bottom: 1.6rem;
  line-height: 1.6;
}

.prose-block p:last-child {
  margin-bottom: 0;
}

.prose-block ul,
.prose-block ol {
  margin: 0 0 1.6rem 2rem;
  line-height: 1.6;
}

.prose-block li {
  margin-bottom: 0.8rem;
}

.prose-block code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9em;
}

/* --- Home page alert callout --------------------- */

/* Time-sensitive banner above the services grid. Deliberately louder than a
   content block without using a pure red alert treatment, which would read as
   a site error rather than an industry advisory. */
.home-alert__card {
  position: relative;
  padding: 3rem 2.4rem;
  border: 1px solid var(--stroke, rgba(255, 255, 255, 0.14));
  border-left: 3px solid #e4572e;
  -moz-border-radius: var(--_radius);
       border-radius: var(--_radius);
  background: rgba(228, 87, 46, 0.05);
}

@media only screen and (min-width: 768px) {
  .home-alert__card {
    padding: 4rem 4rem 4.2rem 4rem;
  }
}

.home-alert__eyebrow {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 0.8rem;
  color: #e4572e;
}

.home-alert__eyebrow i {
  font-size: 1.4em;
  line-height: 1;
}

.home-alert__title {
  margin-top: 1.6rem;
  font-size: clamp(2.4rem, 3.4vw, 3.6rem);
  line-height: 1.15;
}

.home-alert__text {
  margin-top: 1.6rem;
  max-width: 68rem;
}

.home-alert__btnholder {
  margin-top: 2.8rem;
}

/* --- Reading-page type scale --------------------- */

/* The theme's heading sizes are display type built for the home page, where a
   heading is the whole viewport: h1 reaches 160px and h2 reaches 140px at
   >=1600px, with h3 at 64px. That does not work on service and case study
   pages, which are meant to be read rather than scrolled past.
   Scoped to .page-doc so the home page keeps the theme's scale untouched.
   Fluid clamp() values replace the theme's five fixed breakpoints. */

.page-doc h1 {
  font-size: clamp(3.2rem, 5vw, 5.6rem);
  line-height: 1.08;
}

.page-doc h2 {
  font-size: clamp(2.6rem, 3vw, 3.6rem);
  line-height: 1.15;
}

/* h3 and h4 follow from the two above rather than being a separate decision:
   the theme sizes them at up to 64px and 36px, which would both overtake the
   new h2 and leave the heading hierarchy reading backwards. */
.page-doc h3 {
  font-size: clamp(2rem, 2.2vw, 2.6rem);
  line-height: 1.2;
}

.page-doc h4 {
  font-size: clamp(1.8rem, 1.8vw, 2.2rem);
  line-height: 1.3;
}

/* The standfirst sits 45-69px below its heading in the theme. On a reading page
   that is a scroll cost with no benefit. */
.page-doc .h2__text {
  margin-top: 1.6rem;
}

@media only screen and (min-width: 768px) {
  .page-doc .h2__text {
    margin-top: 2rem;
  }
}

/* --- Home hero heading --------------------------- */

/* The theme sizes h1 as display type for a two-word brand name, reaching 160px
   at >=1600px. The H1 is now a full sentence carrying the commercial keywords,
   so it needs a ceiling it can actually wrap within. Still a display heading,
   just not a one-word-per-line one. Scoped to .page-home; .page-doc h1 is set
   separately above. */
.page-home .headline__title {
  font-size: clamp(3.2rem, 5.5vw, 7.2rem);
  line-height: 1.06;
  max-width: 22ch;
}

@media only screen and (min-width: 1200px) {
  .page-home .headline__title {
    max-width: 26ch;
  }
}

/* --- "See all" links under home page sections ---- */

/* .content__block carries horizontal padding only, so a block added after a
   cards grid or the stack needs its own top margin. */
.section-more {
  margin-top: 3.6rem;
}

@media only screen and (min-width: 768px) {
  .section-more {
    margin-top: 4.4rem;
  }
}
