/* Ardwins site components. Values come from tokens.css (var(--…)). */
html, body { overflow-x: clip; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font-sans); font-size: 17px; line-height: 26px; -webkit-font-smoothing: antialiased; font-feature-settings: "ss01" 0; }
:root { --page-margin: var(--layout-margin-desktop); }
@media (max-width: 640px) { :root { --page-margin: var(--layout-margin-mobile); } }
.aw-wrap { box-sizing: border-box; max-width: calc(var(--layout-max) + 2 * var(--page-margin)); margin: 0 auto; padding: 0 var(--page-margin); }
.aw-bleed { box-sizing: border-box; padding: 0 var(--page-margin); overflow: hidden; } /* full viewport width, page margins only: for display words */
.aw-muted { color: var(--ink-muted); }

/* Mark + wordmark */
.aw-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.aw-logo svg { width: 28px; height: 28px; display: block; }
.aw-logo .aw-logo__k { fill: var(--accent); }
.aw-logo span { font-size: 21px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; }

/* Header */
.aw-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); padding: var(--space-6) 0; border-bottom: var(--stroke-hair) solid var(--line); }
.aw-nav { display: flex; align-items: center; gap: var(--space-8); }
.aw-nav a { color: var(--ink-muted); text-decoration: none; font-size: 15px; line-height: 20px; font-weight: 500; transition: color var(--duration-fast); }
.aw-nav a:hover { color: var(--ink); }
.aw-nav a.aw-btn { color: var(--ink-inverse); }
.aw-nav a.aw-btn:hover { color: var(--on-accent); }
@media (max-width: 720px) { .aw-nav a:not(.aw-btn) { display: none; } }

/* Button: pill. Primary = ink fill. Quiet = 1px outline. No icons, no shadows. */
.aw-btn { box-sizing: border-box; display: inline-flex; align-items: center; gap: var(--space-2); height: 48px; padding: 0 var(--space-6); border-radius: var(--radius-pill); border: var(--stroke-control) solid var(--surface-inverse); background: var(--surface-inverse); color: var(--ink-inverse); font: inherit; font-size: 16px; line-height: 20px; font-weight: 500; text-decoration: none; cursor: pointer; transition: background-color var(--duration-fast), color var(--duration-fast); }
.aw-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.aw-btn--quiet { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.aw-btn--quiet:hover { background: transparent; color: var(--ink); border-color: var(--ink); }
.aw-btn--sm { height: 40px; padding: 0 20px; font-size: 15px; }
.aw-btn .aw-arrow { font-weight: 400; }
.aw-btn:focus-visible, .aw-link:focus-visible, .aw-nav a:focus-visible, .aw-logo:focus-visible { outline: var(--stroke-focus) solid var(--focus-ring); outline-offset: var(--focus-offset); }

/* Link: underlined, hairline, accent on hover */
.aw-link { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--line-strong); transition: color var(--duration-fast), text-decoration-color var(--duration-fast); }
.aw-link:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* Label with dot */
.aw-label { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 13px; line-height: 16px; font-weight: 500; letter-spacing: 0.01em; color: var(--ink-muted); }
.aw-label::before { content: ""; width: 6px; height: 6px; border-radius: var(--radius-pill); background: var(--ink-muted); }
.aw-label--status { color: var(--ink); padding: 6px 12px; border-radius: var(--radius-pill); background: var(--surface-muted); }
.aw-label--status::before { background: var(--accent); }

/* Type */
.aw-h1 { margin: 0; font-size: 72px; line-height: 76px; font-weight: 500; letter-spacing: -0.035em; max-width: 13em; text-wrap: balance; }
.aw-h2 { margin: 0; font-size: 44px; line-height: 48px; font-weight: 500; letter-spacing: -0.03em; }
.aw-h3 { margin: 0; font-size: 24px; line-height: 30px; font-weight: 500; letter-spacing: -0.015em; }
.aw-lead { margin: 0; font-size: 21px; line-height: 30px; color: var(--ink-muted); max-width: var(--measure); text-wrap: pretty; }
.aw-body { margin: 0; color: var(--ink-muted); max-width: var(--measure); text-wrap: pretty; }
@media (max-width: 640px) { .aw-h1 { font-size: 44px; line-height: 48px; letter-spacing: -0.03em; } .aw-h2 { font-size: 32px; line-height: 36px; } .aw-lead { font-size: 18px; line-height: 27px; } }


/* Display: one word across the full width (footer wordmark on ardwins.com; product name in a product hero). Max one per page. */
.aw-display { display: block; margin: 0; font-size: clamp(96px, calc((100vw - 2 * var(--page-margin)) / 3.2), 420px); line-height: 0.8; font-weight: 500; letter-spacing: -0.055em; white-space: nowrap; color: var(--ink); }

/* Hero v2: text cols 1–6, copper 3D visual cols 7–12 bleeding off the right edge. The visual is the hero's one accent. */
.aw-hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--layout-gutter); align-items: center; padding: var(--space-24) 0 var(--space-16); }
.aw-hero__text { grid-column: 1 / span 6; grid-row: 1; position: relative; z-index: 1; }
.aw-hero__visual { grid-row: 1; grid-column: 7 / span 6; margin: 0 calc(-1 * var(--page-margin) - 8vw) 0 0; }
.aw-hero__visual img { display: block; width: 100%; height: auto; }
.aw-hero .aw-lead { margin-top: var(--space-6); }
.aw-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-6); margin-top: var(--space-12); }
@media (max-width: 1023.98px) { .aw-hero__text { grid-column: 1 / span 7; } .aw-hero__visual { grid-column: 8 / span 5; margin-right: calc(-1 * var(--page-margin) - 14vw); } }
@media (max-width: 899.98px) { .aw-hero { display: block; padding: var(--space-12) 0 var(--space-8); } .aw-hero__visual { margin: var(--space-8) calc(-1 * var(--page-margin)) 0; } }

/* Section: label in cols 1–3, content in cols 4–12, hairline on top */
.aw-section { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--layout-gutter); padding: var(--space-8) 0 var(--space-24); border-top: var(--stroke-hair) solid var(--line); }
.aw-section > .aw-label { grid-column: 1 / span 3; align-self: start; }
.aw-section > .aw-section__body { grid-column: 4 / span 9; }
@media (max-width: 860px) { .aw-section { display: block; } .aw-section > .aw-section__body { margin-top: var(--space-8); } }

/* Two blocks */
.aw-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: var(--layout-gutter); }
.aw-block { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-8); border-radius: var(--radius-md); background: var(--surface-raised); }
.aw-block .aw-label--status { align-self: flex-start; margin-top: auto; }
@media (max-width: 640px) { .aw-blocks { grid-template-columns: 1fr; } .aw-block { padding: var(--space-6); } }

/* Principles: numbered rows divided by hairlines */
.aw-principles { list-style: none; margin: 0; padding: 0; counter-reset: aw; }
.aw-principles li { display: grid; grid-template-columns: 56px 1fr 1.3fr; gap: var(--layout-gutter); padding: var(--space-6) 0; border-bottom: var(--stroke-hair) solid var(--line); }
.aw-principles li:first-child { padding-top: 0; }
.aw-principles .aw-index { font-size: 14px; line-height: 30px; font-weight: 500; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .aw-principles li { grid-template-columns: 40px 1fr; } .aw-principles li .aw-body { grid-column: 2; } }


/* Services: 4 blocks. 4 columns ≥1024, 2×2 640–1023, 1 column <640 */
.aw-services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--layout-gutter); margin: 0; padding: 0; list-style: none; }
.aw-service { display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-12); min-height: 224px; box-sizing: border-box; padding: var(--space-6); border-radius: var(--radius-md); background: var(--surface-raised); }
.aw-service .aw-index { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 1023.98px) { .aw-services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639.98px) { .aw-services { grid-template-columns: 1fr; } .aw-service { min-height: 0; gap: var(--space-8); } }

/* Lab: 3 slots for products in development. Neutral dots: three identical statuses never spend the section's accent. */
.aw-lab { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--layout-gutter); margin: var(--space-8) 0 0; padding: 0; list-style: none; }
.aw-slot { display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 4 / 3; box-sizing: border-box; padding: var(--space-6); border-radius: var(--radius-md); background: var(--surface-muted); }
.aw-slot .aw-index { font-size: 44px; line-height: 48px; font-weight: 500; letter-spacing: -0.03em; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.aw-slot .aw-label--status { align-self: flex-start; background: var(--surface); }
.aw-slot .aw-label--status::before { background: var(--ink-muted); }
@media (max-width: 860px) { .aw-lab { grid-template-columns: 1fr; } .aw-slot { aspect-ratio: auto; min-height: 160px; } }

/* Capsule row (Process): Idea → Test → Measure → Keep / Stop. Full container width.
   <640 vertical column; 640–1023 row 56px; 1024–1279 row 96px; ≥1280 row 112px. Keep = the section's one accent. */
.aw-capsules { display: flex; flex-wrap: nowrap; align-items: stretch; gap: var(--space-3); margin: 0; padding: 0; list-style: none; --cap-h: 112px; --cap-fs: 32px; }
.aw-cap { flex: 1 1 0; min-width: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: center; height: var(--cap-h); padding: 0 var(--space-6); border-radius: var(--radius-pill); background: var(--surface-muted); color: var(--ink); font-size: var(--cap-fs); line-height: 1; font-weight: 500; letter-spacing: -0.025em; white-space: nowrap; }
.aw-cap--arrow { flex: none; width: var(--cap-h); padding: 0; background: var(--surface-inverse); color: var(--ink-inverse); font-weight: 400; letter-spacing: 0; }
.aw-cap--fork { flex: 1 1 0; display: flex; flex-direction: column; align-items: stretch; justify-content: stretch; gap: var(--space-2); height: var(--cap-h); padding: 0; background: none; }
.aw-cap--fork > span { flex: 1; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-pill); font-size: calc(var(--cap-fs) * 0.62); letter-spacing: -0.01em; }
.aw-cap--keep { background: var(--accent); color: var(--on-accent); }
.aw-capsules .aw-cap--fork { padding: 0; }
.aw-cap--stop { box-sizing: border-box; border: var(--stroke-control) solid var(--line-strong); color: var(--ink-muted); }
.aw-capsules + .aw-body { margin-top: var(--space-8); }
@media (max-width: 1279.98px) { .aw-capsules { --cap-h: 96px; --cap-fs: 26px; } .aw-cap { padding: 0 var(--space-4); } }
@media (max-width: 1023.98px) { .aw-capsules { --cap-h: 56px; --cap-fs: 17px; gap: var(--space-2); } .aw-cap { padding: 0 var(--space-3); } .aw-cap--arrow { width: 40px; height: 40px; align-self: center; } .aw-cap--fork { gap: 4px; } .aw-cap--fork > span { font-size: 13px; } }
@media (max-width: 639.98px) {
  .aw-capsules { flex-direction: column; gap: var(--space-2); --cap-h: 64px; --cap-fs: 21px; }
  .aw-cap { flex: none; width: 100%; }
  .aw-cap--arrow { width: 40px; height: 40px; align-self: center; transform: rotate(90deg); }
  .aw-cap--fork { flex-direction: row; height: 56px; gap: var(--space-3); }
  .aw-cap--fork > span { font-size: 17px; }
}

/* Dark block: one inverse content block per page, any section (Contact on ardwins.com). In dark theme it inverts to light. */
.aw-dark, .aw-contact { padding: var(--space-16) var(--space-12); border-radius: var(--radius-lg); background: var(--surface-inverse); color: var(--ink-inverse); }
.aw-dark .aw-body, .aw-contact .aw-body { color: var(--ink-inverse); margin-top: var(--space-4); }
.aw-dark .aw-label, .aw-contact .aw-label { color: var(--ink-inverse); }
.aw-dark .aw-label::before, .aw-contact .aw-label::before { background: var(--ink-inverse); }
.aw-dark .aw-btn, .aw-contact .aw-btn { margin-top: var(--space-8); background: var(--surface); border-color: var(--surface); color: var(--ink); }
.aw-dark .aw-btn:hover, .aw-contact .aw-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.aw-dark .aw-btn:focus-visible, .aw-contact .aw-btn:focus-visible { outline-color: var(--surface); }
@media (max-width: 640px) { .aw-dark, .aw-contact { padding: var(--space-12) var(--space-6); } }

/* Footer v2: display wordmark across the full width, then one line of legal links */
.aw-footer-word { padding-top: var(--space-24); }
.aw-footer-word .aw-display { margin-bottom: calc(var(--space-6) * -0.5); }
.aw-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-6) 0 var(--space-8); border-top: var(--stroke-hair) solid var(--line); font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.aw-footer nav { display: flex; gap: var(--space-6); }
.aw-footer a { color: var(--ink-muted); text-decoration: none; }
.aw-footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
