/* Redagama: page CSS for the sections below the hero. */

/* ---------------------------------------------------------------- what we do (#services)
   One screen: the heading and its aside on top, the five disciplines below as one ruled band.
   Desktop (1024 up): five columns between hairlines, each filling the rest of the screen.
   Below that: one row per discipline (number, glyph, name, line, what it covers). */
.wwd > .wrap { display: flex; flex-direction: column; gap: var(--s-8); }

.wwd__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-7) var(--gutter); align-items: start; }
.wwd__title { grid-column: 1 / span 7; }
.wwd__aside { grid-column: 8 / -1; }
.wwd__title { display: flex; flex-direction: column; gap: var(--s-4); }
.wwd__title > h2 { font: 400 clamp(36px, 2.6vw + 14px, 64px)/1 var(--font-display); letter-spacing: .01em; max-width: 14em; text-wrap: balance; }
/* the label reads first but follows the h2 in the markup, so the section still opens on its heading */
.wwd__label { order: -1; font: 400 20px/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase;
  color: color-mix(in oklab, var(--p-accent) 78%, var(--p-ink)); position: relative; }
/* the studio's red square hangs in the gutter, so the word keeps the column line */
.wwd__label::before { content: ""; position: absolute; left: -18px; top: 50%; width: 8px; height: 8px; margin-top: -5px; background: var(--p-accent); }
.wwd__aside { display: grid; gap: var(--s-5); justify-items: start; }
.wwd__aside > p { color: var(--muted); font-size: var(--t-body); line-height: 1.55; max-width: 38ch; }

.wwd__list { list-style: none; margin: 0; padding: 0; flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.wwd__item { position: relative; display: flex; flex-direction: column; gap: var(--s-4); min-width: 0;
  padding: var(--s-6) var(--s-5) var(--s-6); border-left: 1px solid var(--line); }
.wwd__item:first-child { border-left: 0; padding-left: 0; }
.wwd__item:last-child { padding-right: 0; }
/* a red mark on the rule above each column: the studio's square, as in the label and the hero's button */
.wwd__item::before { content: ""; position: absolute; top: -1px; left: 0; width: 32px; height: 2px; background: var(--p-accent); }
.wwd__item:not(:first-child)::before { left: var(--s-5); }

.wwd__num { font: 400 18px/1 var(--font-display); letter-spacing: .08em; color: var(--muted); }
.wwd__icon { display: grid; place-items: center; width: 56px; height: 56px; margin-top: var(--s-2);
  border: 1px solid var(--line-strong); border-radius: var(--r-md); color: var(--p-accent);
  background: color-mix(in oklab, var(--p-accent) 8%, transparent); }
.wwd__icon > svg { width: 26px; height: 26px; }
.wwd__item > h3 { margin-top: var(--s-2); font: 400 26px/1.05 var(--font-display); letter-spacing: .06em; text-transform: uppercase; }
.wwd__item > p { color: var(--muted); font-size: var(--t-body); line-height: 1.55; max-width: 30ch; }
.wwd__covers { list-style: none; margin: auto 0 0; padding: var(--s-4) 0 0; display: grid; gap: var(--s-2);
  border-top: 1px dashed var(--line); font-size: var(--t-body); color: var(--ink); }
.wwd__covers > li { display: flex; align-items: center; gap: 10px; }
.wwd__covers > li::before { content: ""; flex: none; width: 5px; height: 5px; background: var(--p-accent); }

/* small laptops: the five columns stay, a little tighter */
@media (min-width: 1024px) and (max-width: 1279px) {
  .wwd > .wrap { gap: var(--s-5); }
  .wwd__head { row-gap: var(--s-5); }
  .wwd__item { padding: var(--s-4) var(--s-4); gap: var(--s-3); }
  .wwd__item:not(:first-child)::before { left: var(--s-4); }
  .wwd__icon { width: 44px; height: 44px; margin-top: 0; }
  .wwd__icon > svg { width: 22px; height: 22px; }
  .wwd__item > h3 { font-size: 22px; margin-top: 0; }
  .wwd__item > p { line-height: 1.45; }
  .wwd__covers { padding-top: var(--s-3); gap: var(--s-1); }
}
/* under 1024: one row per discipline, the name and line beside the glyph, what it covers on the right */
@media (max-width: 1023px) {
  .wwd > .wrap { gap: var(--s-7); }
  .wwd__list { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; }
  .wwd__item { display: grid; grid-template-columns: 40px 56px minmax(0, 5fr) minmax(0, 3fr); grid-template-rows: auto 1fr;
    column-gap: var(--s-5); row-gap: var(--s-1); align-items: start;
    padding: var(--s-4) 0; border-left: 0; border-top: 1px solid var(--line); }
  .wwd__item:first-child { border-top: 0; }
  .wwd__item::before, .wwd__item:not(:first-child)::before { display: none; }
  .wwd__num { grid-row: 1 / 3; padding-top: 4px; }
  .wwd__icon { grid-row: 1 / 3; margin: 0; width: 48px; height: 48px; }
  .wwd__icon > svg { width: 22px; height: 22px; }
  .wwd__item > h3 { grid-column: 3; margin: 0; font-size: 24px; }
  .wwd__item > p { grid-column: 3; max-width: 52ch; }
  .wwd__covers { grid-column: 4; grid-row: 1 / 3; margin: 0; padding: 0; border: 0; gap: var(--s-1); }
}
@media (max-width: 1023px) {
  .wwd__head { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
  .wwd__title, .wwd__aside { grid-column: 1 / -1; }
  .wwd__aside { grid-template-columns: minmax(0, 1fr) auto; align-items: center; justify-items: stretch; }
  .wwd__aside > p { max-width: 46ch; }
}
/* phones: the glyph and the name share a line, the line under them; what it covers is left to the conversation */
@media (max-width: 639px) {
  .wwd > .wrap { gap: var(--s-5); }
  .wwd__title { gap: var(--s-3); }
  .wwd__title > h2 { font-size: 30px; }
  .wwd__label { font-size: 18px; }
  .wwd__aside { grid-template-columns: minmax(0, 1fr); }
  /* the hero's button is one screen up and the closing one follows: here the list keeps the screen */
  .wwd__aside { display: none; }
  .wwd__list { grid-auto-rows: auto; }
  .wwd__item { grid-template-columns: 40px minmax(0, 1fr); column-gap: var(--s-4); row-gap: var(--s-1); padding: var(--s-3) 0; }
  .wwd__item > p { line-height: 1.45; }
  .wwd__num { display: none; }
  .wwd__icon { grid-row: 1 / 3; width: 40px; height: 40px; }
  .wwd__icon > svg { width: 20px; height: 20px; }
  .wwd__item > h3 { grid-column: 2; font-size: 22px; }
  .wwd__item > p { grid-column: 2; }
  .wwd__covers { display: none; }
}
