/* The home page as editable blocks (inc/home.php).
   The blocks carry the prototype's class names, so site.css styles them. This file covers only the places
   where block markup differs from the prototype's hand-written markup: list items that became groups,
   description lists that became paragraph pairs, and buttons that became button blocks.
   It is also loaded into the editor, so the page looks the same while it is edited. */

/* Slider: each slide is a Cover block (inc/slider.php). WordPress's own Cover styles are undone so the
   slides stack and fade as in the prototype; the picture's focal point comes from the block. */
.slider .slide.wp-block-cover { position: absolute; inset: 0; display: block; min-height: 0; padding: 0; overflow: hidden; }
.slider .wp-block-cover__image-background { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; object-fit: cover; }
.slider .wp-block-cover__background { display: none; }
.slider .wp-block-cover__inner-container { position: static; width: auto; z-index: auto; color: inherit; }
.slider .slide-copy h1 { color: #fff; }
.slide-copy .wp-block-buttons { margin-top: 2rem; }
.slide-copy .wp-block-button__link { min-height: 3.1rem; padding-inline: 1.75rem; text-shadow: none; }
.slide-copy .is-secondary .wp-block-button__link { border-color: #fff; color: #fff; }
.slide-copy .is-secondary .wp-block-button__link:hover { background: #fff; color: #0b0f14; }
@media (max-width: 40rem) {
  .slide-copy .wp-block-buttons { margin-top: 1.4rem; gap: 0.6rem; }
  .slide-copy .wp-block-button__link { min-height: 2.9rem; padding-inline: 1.25rem; }
}

/* Pictures that were bare <img> are now inside a <figure>. */
.home-main figure.wp-block-image, .editor-styles-wrapper .card figure.wp-block-image { margin: 0; }

/* What we do: the cards were list items. */
.cards > .card { display: flex; flex-direction: column; }

/* Who we work with: the panels were list items. */
.who > .who-panel { display: flex; flex-direction: column; padding: clamp(1.5rem, 2.4vw, 2.25rem); border-radius: 16px; background: var(--tint); }

/* Name and description rows (work done, equipment makers) were <dl> pairs. */
.case-moves > .pair-row, .vendors > .pair-row { display: grid; gap: 1rem; padding-block: 1rem; }
.case-moves > .pair-row { grid-template-columns: 10.5rem 1fr; border-top: 1px solid var(--rule); }
.case-moves > .pair-row:last-child { border-bottom: 1px solid var(--rule); }
.case-moves .pair-name { font-family: var(--font-head); font-weight: 600; color: var(--ink); }
.case-moves .pair-text { color: var(--ink-2); }
.vendors > .pair-row { grid-template-columns: 12rem 1fr; padding-block: 1.15rem; border-top: 1px solid var(--paper-rule); }
.vendors > .pair-row:last-child { border-bottom: 1px solid var(--paper-rule); }
.vendors .pair-name { font-family: var(--font-head); font-size: 1.1rem; font-weight: 600; }
.vendors .pair-text { color: var(--paper-ink-2); }

/* Buttons are button blocks (pages.css styles them); these set the spacing the prototype's .btn had. */
.case-main .wp-block-buttons { margin-top: 2rem; }
.innovation-copy .wp-block-buttons { margin-top: 2.25rem; }
.partners-head .wp-block-buttons, .contact-copy .wp-block-buttons { margin-top: 2rem; }
/* On the dark bands, the outlined button is light. */
.deep .is-secondary .wp-block-button__link, .case-panel .is-secondary .wp-block-button__link { border-color: var(--edge-line); background: rgb(5 22 47 / 0.55); color: var(--ink); }
.deep .is-secondary .wp-block-button__link:hover { border-color: var(--cyan); color: #fff; }

/* AI and blockchain: each heading leads to its page. */
.innovation-copy h3 a { color: inherit; text-decoration: none; }
.innovation-copy h3 a:hover { text-decoration: underline; text-decoration-color: var(--cyan); text-underline-offset: 0.2em; }

/* Company story: the blue half of the heading, and each stop's line under its city. */
.story-band h2 em { font-style: normal; color: var(--blue); }
.route li { color: var(--paper-ink-2); }
.route li strong { margin-bottom: 0.25rem; color: var(--paper-ink); }

/* Contact: the address line. */
.contact-address { margin-top: 2.5rem; font-weight: 560; }

@media (max-width: 52rem), (orientation: portrait) and (max-width: 64rem) {
  .case-moves > .pair-row, .vendors > .pair-row { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* ---------- In the editor ---------- */
/* The slides stand one under another, each with its words over its picture, so every one can be edited. */
.editor-styles-wrapper .slider { height: auto; min-height: 0; overflow: visible; }
.editor-styles-wrapper .slider .slide.wp-block-cover { position: relative; inset: auto; min-height: 34rem; opacity: 1; visibility: visible; transition: none; }
.editor-styles-wrapper .slider .slide + .slide { margin-top: 4px; }
.editor-styles-wrapper .slider .slide-copy { position: relative; left: auto; bottom: auto; padding: 7rem var(--edge, 2rem) 4rem; }
/* Pieces built into the theme show as labelled panels. */
.ydnar-feature-panel {
  margin: 0; padding: 2rem var(--gutter, 1.5rem); background: #0b1a33; color: #fff;
  border: 2px dashed rgb(255 255 255 / 0.35); font-family: var(--font-body, sans-serif);
}
.ydnar-feature-panel .ydnar-feature-label { font-family: var(--font-head, sans-serif); font-size: 1.25rem; font-weight: 600; }
.ydnar-feature-panel .ydnar-feature-note { margin-top: 0.4rem; color: #d6deea; }
.ydnar-feature-panel .ydnar-feature-how { margin-top: 0.8rem; font-size: 0.875rem; color: #ffb34d; }
/* Who we work with: a ruled list of three, lighter than the photo cards of What we do just above. */
.who > .who-panel { padding: 1.5rem 0 0; border-radius: 0; background: none; border-top: 2px solid var(--paper-ink); }

/* Who we work with ends on the Government work, as its proof. */
.sectors .case-panel { margin-top: clamp(3rem, 6vw, 5rem); scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.partners-head .card-go { margin-top: 1.25rem; }

/* The Government work rows carry full sentences: they take more of the panel, with a narrow label column. */
@media (min-width: 52.01rem) {
  .case-panel .case-main { grid-column: 1 / span 5; }
  .case-panel .case-moves { grid-column: 6 / -1; }
  .case-moves > .pair-row { grid-template-columns: 8rem 1fr; }
}
