/* attiva. one-page site. Light theme only. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("fonts/public-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("fonts/public-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #fafaf7;
  --fg: #121210;
  --muted: #55554e;
  --line: #dcdcd2;
  --panel: #f0efe6;
  --kowhai: #f6c315;
  --on-kowhai: #121210;
  --ink-block: #121210;
  --on-ink: #fafaf7;
  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
  --measure: 680px;
  --wide: 1040px;
  --video: 960px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: clamp(2.5rem, 8.5vw, 4.75rem);
  line-height: 1.02;
  max-width: 17ch;
}

h2 {
  font-size: clamp(2rem, 5.5vw, 3rem);
  line-height: 1.05;
}

h3 {
  font-weight: 700;
  font-size: clamp(1.375rem, 3.2vw, 1.625rem);
  line-height: 1.15;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

:focus-visible {
  outline: 3px solid var(--fg);
  outline-offset: 3px;
}

/* Layout */

.wrap {
  width: 100%;
  max-width: calc(var(--wide) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.measure {
  max-width: var(--measure);
}

section {
  padding-block: 64px;
  border-top: 1px solid var(--line);
}

main > section:first-child {
  border-top: 0;
}

.stack > * + * {
  margin-top: 1.25rem;
}

.section-head {
  margin-bottom: 2rem;
}

/* Wordmark: one component, sized by its container */

.wordmark {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--fg);
  text-decoration: none;
  font-size: 1.75rem;
}

.wordmark .dot {
  color: var(--kowhai);
}

/* Header and nav */

.site-header {
  padding-block: 16px 8px;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 24px;
}

.site-header .wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  column-gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.label,
.nav-list a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.nav-list a:hover {
  text-decoration: underline;
  text-underline-offset: 0.35em;
  text-decoration-thickness: 2px;
}

/* Hero */

.hero {
  padding-block: 56px 72px;
}

.hero p {
  font-size: 1.1875rem;
}

.hero .stack > * + * {
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  background: var(--kowhai);
  color: var(--on-kowhai);
  border: 0;
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}

.button:hover {
  background: var(--ink-block);
  color: var(--on-ink);
}

/* Who it is for */

.lines p {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 3.4vw, 1.625rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  max-width: var(--measure);
  padding-block: 14px;
  border-top: 1px solid var(--line);
}

.lines p:last-child {
  border-bottom: 1px solid var(--line);
}

/* Cards */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 28px 24px;
}

.card > * + * {
  margin-top: 0.875rem;
}

.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.cards.is-stacked .card {
  display: grid;
  gap: 0.75rem;
}

.cards.is-stacked .card > * + * {
  margin-top: 0;
}

.closing {
  margin-top: 2rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}

.subhead {
  margin-top: 56px;
}

.subhead + * {
  margin-top: 1.25rem;
}

/* Diagram */

.diagram {
  margin-top: 2rem;
  max-width: 720px;
  margin-inline: auto;
}

.diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

.diagram .tool-box {
  fill: var(--panel);
  stroke: var(--fg);
  stroke-width: 1.5;
}

.diagram .link {
  stroke: var(--fg);
  stroke-width: 3;
  fill: none;
}

.diagram .hub {
  fill: var(--kowhai);
}

.diagram text {
  fill: var(--fg);
  text-anchor: middle;
}

.diagram .hub-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 40px;
  letter-spacing: -0.02em;
}

.diagram .tool-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 26px;
}

.diagram .tool-role {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
}

.diagram .tool-name,
.diagram .hub-text {
  transition: opacity 0.36s ease;
}
/* Diagram animation. Static without JS or with reduced motion. */

.diagram .flow {
  stroke: var(--kowhai);
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 0.09 0.16;
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .js .diagram .link {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
  }

  .js .diagram .hub-group,
  .js .diagram .tool {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
  }

  .js .diagram .hub-group {
    transform: scale(0.8);
  }

  .js .diagram .tool {
    transform: translateY(12px);
  }

  .js .diagram.is-visible .hub-group {
    animation: diagram-pop 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  }

  .js .diagram.is-visible .link {
    animation: diagram-draw 0.7s ease-out forwards;
  }

  .js .diagram.is-visible .tool {
    animation: diagram-rise 0.6s ease-out forwards;
  }

  .js .diagram.is-visible .link-1 { animation-delay: 0.45s; }
  .js .diagram.is-visible .link-2 { animation-delay: 0.6s; }
  .js .diagram.is-visible .link-3 { animation-delay: 0.75s; }
  .js .diagram.is-visible .link-4 { animation-delay: 0.9s; }
  .js .diagram.is-visible .tool-1 { animation-delay: 0.85s; }
  .js .diagram.is-visible .tool-2 { animation-delay: 1s; }
  .js .diagram.is-visible .tool-3 { animation-delay: 1.15s; }
  .js .diagram.is-visible .tool-4 { animation-delay: 1.3s; }

  .js .diagram.is-visible .flow {
    opacity: 0.95;
    transition: opacity 0.8s ease 1.9s;
    animation: diagram-flow 2.6s linear infinite;
  }

  @keyframes diagram-pop {
    to { opacity: 1; transform: scale(1); }
  }

  @keyframes diagram-draw {
    to { stroke-dashoffset: 0; }
  }

  @keyframes diagram-rise {
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes diagram-flow {
    from { stroke-dashoffset: 1; }
    to { stroke-dashoffset: 0; }
  }
}

/* Pull quote */

.quote {
  margin: 56px 0 0;
}

.quote p {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 6.5vw, 3.5rem);
  line-height: 1.3;
  max-width: 20ch;
}

.quote .band {
  background: var(--kowhai);
  color: var(--on-kowhai);
  padding: 0.04em 0.18em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.quote-line {
  margin-top: 1.5rem;
}

/* Video */

.videos {
  display: grid;
  gap: 48px;
  max-width: var(--video);
}

.videos video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ink-block);
}

.caption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}

/* People and contact */

.portrait {
  display: block;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--bg);
}

.card .portrait + h3 {
  margin-top: 1.25rem;
}

.details {
  margin-top: 1.5rem;
}

.details p {
  font-weight: 600;
}

/* Footer */

.site-footer {
  background: var(--ink-block);
  color: var(--on-ink);
  padding-block: 72px 56px;
}

.site-footer .wordmark {
  color: var(--on-ink);
  font-size: clamp(4.5rem, 20vw, 9rem);
}

.site-footer p {
  margin-top: 2rem;
  max-width: var(--measure);
}

.site-footer :focus-visible {
  outline-color: var(--on-ink);
}

/* Wider screens */

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }

  body {
    font-size: 1.125rem;
  }

  section {
    padding-block: 96px;
  }

  .hero {
    padding-block: 88px 104px;
  }

  .card {
    padding: 36px 32px;
  }

  .cards.is-two {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards.is-stacked .card {
    grid-template-columns: minmax(180px, 1fr) 3fr;
    column-gap: 32px;
  }
}

@media (min-width: 860px) {
  .cards.is-three {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 420px) {
  .nav-list {
    column-gap: 16px;
  }
}
