/* ConfidentIQ website, styles part three of four: the containers pages are built from.
   Sections, panels, diagrams, cards, rows and the lists that sit in them. content.css holds tables, stages, the form and motion.
   Every block reads the colour tokens in styles.css, so the same block works on a light section, in the dark theme and inside a .night band. */

/* Sections */
.section { padding: clamp(4rem, 8.5vw, 7.5rem) 0; }
.section--flush { padding-top: 0; }
.section--tint { background: var(--tint); border-radius: var(--radius-xl); }
.section--night { background: var(--bg); border-radius: var(--radius-xl); }
.section-head { max-width: 47rem; margin-bottom: clamp(2.25rem, 4.5vw, 3.75rem); }
.section-head > * + * { margin-top: 1.1rem; }
.section-head .eyebrow + h2 { margin-top: 1rem; }
.section-head p:not(.eyebrow) { font-size: clamp(1.0625rem, 0.4vw + 1rem, 1.2rem); line-height: 1.55; color: var(--text); }
/* A wide heading block: the heading on the left, its supporting text on the right. */
.section-head--split { max-width: none; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 1.25rem clamp(2rem, 6vw, 5rem); align-items: start; }
.section-head--split > * { margin-top: 0; }
.section-head--split > div > * + * { margin-top: 1.1rem; }
.section-head--split > div > .eyebrow + h2 { margin-top: 1rem; }
/* The supporting text starts level with the first line of the heading, below the eyebrow. */
.section-head--split > div:last-child { padding-top: 2.35rem; }
@media (max-width: 900px) { .section-head--split { grid-template-columns: minmax(0, 1fr); } .section-head--split > div:last-child { padding-top: 0; } }
.note { font-size: 0.9375rem; line-height: 1.55; color: var(--muted); }

/* Panels and figures: the container for one diagram, list, table or set of steps. */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.1rem, 2.6vw, 2.1rem); box-shadow: var(--shadow); }
figure.panel { margin: 0; }
.panel > h2, .panel > h3, .panel > h4 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.015em; font-weight: 600; margin-bottom: 1.1rem; }
.figure-note { margin-top: 1rem; font-size: 0.875rem; line-height: 1.5; color: var(--muted); }

/* Trust diagrams: inline SVG drawn with a fixed set of classes, so they follow the surface they sit on. */
.dg { display: block; width: 100%; height: auto; font-family: var(--body); }
.dg text { fill: var(--ink); font-size: 14px; font-weight: 600; text-anchor: middle; }
.dg .dg-sub { fill: var(--muted); font-size: 12.5px; font-weight: 500; }
.dg .dg-box { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.25; }
.dg .dg-fence { fill: none; stroke: var(--muted); stroke-width: 1.25; stroke-dasharray: 4 5; }
.dg .dg-line { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.dg .dg-dash { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 3 5; }
.dg .dg-leaf { fill: var(--accent); }
.dg .dg-todo { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.25; }
.dg .dg-accent-line { fill: none; stroke: var(--accent); stroke-width: 2; }
.dg .dg-accent-text { fill: var(--accent); }
.dg .dg-accent-box { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.25; }
.dg .dg-start { text-anchor: start; }
/* A diagram shrinks with the screen, so its labels are set a little larger on a phone. */
@media (max-width: 600px) {
  .dg text { font-size: 15px; }
  .dg .dg-sub { font-size: 13.5px; }
}
.night .dg .dg-box { fill: rgb(255 255 255 / 0.05); stroke: rgb(255 255 255 / 0.22); }
.night .dg .dg-accent-box { fill: rgb(116 210 202 / 0.09); }
.night .dg .dg-leaf { filter: drop-shadow(0 0 5px rgb(116 210 202 / 0.6)); }
.night .dg .dg-accent-line { filter: drop-shadow(0 0 6px rgb(116 210 202 / 0.55)); }

/* Standards strip */
.strip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.strip-row li { padding: 0.3rem 0.7rem; border: 1px solid var(--line); border-radius: 999px; font: 500 0.75rem/1.3 var(--mono); color: var(--text); }
.strip-row li:first-child { padding-left: 0; border: 0; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.strip-row strong { font-weight: 500; }
.hero .strip-row { margin-top: clamp(2.25rem, 4vw, 3.5rem); padding-top: 1.5rem; border-top: 1px solid rgb(255 255 255 / 0.12); }
.hero .strip-row li { border-color: rgb(255 255 255 / 0.14); }

/* Cards: one fact, one choice or one destination each. */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.cards--2 { --cols: 2; }
.cards--4 { --cols: 4; }
.card { position: relative; display: flex; flex-direction: column; gap: 0.6rem; padding: clamp(1.35rem, 2vw, 1.75rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); }
.card h3 { font-size: 1.1875rem; }
.card p { font-size: 1rem; line-height: 1.55; }
.card .note { font-size: 0.9375rem; }
.card-num { font: 500 0.8125rem/1 var(--mono); letter-spacing: 0.04em; color: var(--accent); margin-bottom: 0.35rem; }
.card-kicker { font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.card .meta { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.9375rem; color: var(--muted); }
.card .meta strong { color: var(--ink); font-weight: 600; }
.card--plain { background: none; border-style: dashed; border-color: var(--line-strong); justify-content: center; }
/* A card that is one link. The whole card is the target. */
a.card { text-decoration: none; transition: border-color 0.25s var(--ease), box-shadow 0.35s var(--ease), transform 0.35s var(--ease); }
a.card h3 { transition: color 0.25s var(--ease); }
a.card:hover { color: var(--text); border-color: var(--accent); box-shadow: var(--shadow-lift); transform: translateY(-3px); }
a.card:hover h3 { color: var(--accent); }
.card-go { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-top: auto; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--ink); transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease); }
.card-go svg { width: 1rem; height: 1rem; }
a.card:hover .card-go { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
a.card > .card-go { align-self: flex-start; }
a.card > p:last-of-type { margin-bottom: 0.9rem; }
a.card > .link-arrow { margin-top: auto; color: var(--accent); }
.card--paper { padding: clamp(1.6rem, 3vw, 2.5rem); }
.card--paper h3 { font-size: clamp(1.5rem, 1.2vw + 1.1rem, 2rem); letter-spacing: -0.03em; line-height: 1.1; font-weight: 700; }
@media (max-width: 1000px) { .cards--4 { --cols: 2; } }
@media (max-width: 900px) { .cards { --cols: 2; } }
@media (max-width: 640px) { .cards, .cards--2, .cards--4 { --cols: 1; } }

/* The offerings grid on the home page: five cards, the two leading products wider. */
.bento { display: grid; gap: 1rem; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.bento > * { grid-column: span 2; }
.bento > .bento-wide { grid-column: span 3; }
.bento .card { min-height: 100%; padding: clamp(1.5rem, 2.4vw, 2.1rem); }
.bento h3 { font-size: clamp(1.4rem, 1vw + 1.05rem, 1.75rem); letter-spacing: -0.025em; }
/* Each offering carries a small drawing of itself, set on a dotted stage. */
.bento-stage { display: grid; place-items: center; min-height: 10.5rem; margin-bottom: 1.1rem; padding: 1.75rem 1.25rem; border: 1px solid var(--line); border-radius: 14px; background-color: var(--bg); background-image: radial-gradient(var(--line) 1px, transparent 1.4px); background-size: 20px 20px; background-position: center; transition: border-color 0.25s var(--ease); }
a.card:hover .bento-stage { border-color: var(--accent); }
.bento-art { display: block; width: 100%; max-width: 15rem; height: auto; overflow: visible; }
.bento-wide .bento-art { max-width: 19rem; }
@media (max-width: 900px) { .bento > *, .bento > .bento-wide { grid-column: span 3; } .bento > :last-child { grid-column: 1 / -1; } }
@media (max-width: 640px) { .bento > *, .bento > .bento-wide { grid-column: 1 / -1; } }

/* Text beside a figure. Every second row flips sides. */
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5.5rem); align-items: center; }
.row--top { align-items: start; }
.row + .row { margin-top: clamp(4.5rem, 9vw, 8rem); }
.row--flip .row-copy { order: 2; }
.row-copy > * + * { margin-top: 1.15rem; }
.row-copy .eyebrow + h2 { margin-top: 1rem; }
.row-copy h2 { font-size: clamp(1.8rem, 1.9vw + 1.05rem, 2.6rem); }
.row-copy h3 { margin-top: 2rem; }
.row-copy .link-arrow, .row-copy .actions { margin-top: 1.75rem; }
.row-side { display: grid; gap: 1rem; }
@media (max-width: 900px) {
  .row { grid-template-columns: minmax(0, 1fr); }
  .row--flip .row-copy { order: 0; }
}

/* Short facts with a lead-in, marked with the accent square. */
.facts { display: grid; gap: 0.9rem; }
.facts > li { position: relative; padding-left: 1.5rem; }
.facts > li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 0.5rem; height: 0.5rem; background: var(--accent); border-radius: 1px; }
.facts strong { color: var(--ink); font-weight: 600; }

/* Ruled list: a term and its detail, row by row. */
.ruled > li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 0.25rem 1.5rem; padding: 0.95rem 0; border-bottom: 1px solid var(--line); }
.ruled > li:first-child { padding-top: 0; }
.ruled > li:last-child { border-bottom: 0; padding-bottom: 0; }
.ruled strong { color: var(--ink); font-weight: 600; }
.ruled span { color: var(--muted); font-size: 0.975rem; }
@media (max-width: 520px) { .ruled > li { grid-template-columns: 1fr; } }

/* Link rows: a list where each row is one destination. */
.links { display: grid; }
.links a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.2rem 1.25rem; padding: 1.05rem 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.links li:last-child a { border-bottom: 0; }
.links strong { color: var(--ink); font-weight: 600; transition: color 0.2s var(--ease); }
.links span { grid-column: 1; color: var(--muted); font-size: 0.975rem; }
.links svg { grid-column: 2; grid-row: 1 / span 2; width: 1rem; height: 1rem; color: var(--muted); transition: transform 0.25s var(--ease), color 0.2s var(--ease); }
.links a:hover strong, .links a:hover svg { color: var(--accent); }
.links a:hover svg { transform: translateX(3px); }

.links--ext svg { transform: rotate(-45deg); }
.links--ext a:hover svg { transform: rotate(-45deg) translateX(3px); }

/* Option cards keep their old name for the logo review sheet. */
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1rem; }
.option { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.option h3 + p, .option h2 + p { margin-top: 0.6rem; }

/* A chain of trust written out link by link. */
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); font: 500 0.78rem/1.3 var(--mono); color: var(--text); }
.chain li { display: inline-flex; align-items: center; gap: 0.4rem; }
.chain li + li::before { content: ""; width: 0.75rem; height: 2px; border-radius: 1px; background: var(--accent); }
.chain li span { padding: 0.25rem 0.5rem; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }

/* Definition list: term on the left, detail on the right. */
.spec > div { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); gap: 0.4rem 2.5rem; padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.spec > div:first-child { border-top: 1px solid var(--line); }
.spec dt { font: 600 1.1rem/1.3 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.spec dt a { color: inherit; text-decoration-color: var(--accent); }
.spec dt a:hover { color: var(--accent); }
@media (max-width: 700px) { .spec > div { grid-template-columns: 1fr; } }
/* The same list as a grid of cards. */
.spec--cards { display: grid; gap: 1rem; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
.spec--cards.spec--3 { --cols: 3; }
.spec--cards > div, .spec--cards > div:first-child { display: flex; flex-direction: column; gap: 0.55rem; padding: clamp(1.35rem, 2vw, 1.75rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.spec--cards dd { font-size: 1rem; line-height: 1.55; }
/* An odd card out takes the full row, so a group never ends on a gap. */
.spec--cards:not(.spec--3) > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 900px) { .spec--cards.spec--3 { --cols: 2; } }
@media (max-width: 640px) { .spec--cards, .spec--cards.spec--3 { --cols: 1; } }

/* A named group of facts: the group title holds its place while its cards scroll past. */
.group { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 3fr); gap: 1.5rem clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.group + .group { margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); }
.group-head { position: sticky; top: 104px; }
.group-head h3 { font-size: clamp(1.35rem, 1vw + 1.05rem, 1.7rem); letter-spacing: -0.025em; }
.group-head p { margin-top: 0.6rem; font-size: 0.975rem; color: var(--muted); }
.group-head .card-num { margin-bottom: 0.9rem; }
@media (max-width: 900px) { .group { grid-template-columns: minmax(0, 1fr); } .group-head { position: static; } }
